docusign_esign.apis.templates_api

DocuSign REST API

The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501

OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git

   1# coding: utf-8
   2
   3"""
   4    DocuSign REST API
   5
   6    The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.  # noqa: E501
   7
   8    OpenAPI spec version: v2.1
   9    Contact: devcenter@docusign.com
  10    Generated by: https://github.com/swagger-api/swagger-codegen.git
  11"""
  12
  13
  14from __future__ import absolute_import
  15
  16import sys
  17import os
  18import re
  19
  20# python 2 and python 3 compatibility library
  21from six import iteritems
  22
  23from ..client.configuration import Configuration
  24from ..client.api_client import ApiClient
  25
  26
  27class TemplatesApi(object):
  28    """
  29    NOTE: This class is auto generated by the swagger code generator program.
  30    Do not edit the class manually.
  31    Ref: https://github.com/swagger-api/swagger-codegen
  32    """
  33
  34    def __init__(self, api_client=None):
  35        config = Configuration()
  36        if api_client:
  37            self.api_client = api_client
  38        else:
  39            if not config.api_client:
  40                config.api_client = ApiClient()
  41            self.api_client = config.api_client
  42
  43    def create_custom_fields(self, account_id, template_id, **kwargs):
  44        """
  45        Creates custom document fields in an existing template document.
  46        Creates custom document fields in an existing template document.
  47        This method makes a synchronous HTTP request by default. To make an
  48        asynchronous HTTP request, please define a `callback` function
  49        to be invoked when receiving the response.
  50        >>> def callback_function(response):
  51        >>>     pprint(response)
  52        >>>
  53        >>> thread = api.create_custom_fields(account_id, template_id, callback=callback_function)
  54
  55        :param callback function: The callback function
  56            for asynchronous request. (optional)
  57        :param str account_id: The external account number (int) or account ID Guid. (required)
  58        :param str template_id: The ID of the template being accessed. (required)
  59        :param TemplateCustomFields template_custom_fields:
  60        :return: CustomFields
  61                 If the method is called asynchronously,
  62                 returns the request thread.
  63        """
  64        kwargs['_return_http_data_only'] = True
  65        if kwargs.get('callback'):
  66            return self.create_custom_fields_with_http_info(account_id, template_id, **kwargs)
  67        else:
  68            (data) = self.create_custom_fields_with_http_info(account_id, template_id, **kwargs)
  69            return data
  70
  71    def create_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
  72        """
  73        Creates custom document fields in an existing template document.
  74        Creates custom document fields in an existing template document.
  75        This method makes a synchronous HTTP request by default. To make an
  76        asynchronous HTTP request, please define a `callback` function
  77        to be invoked when receiving the response.
  78        >>> def callback_function(response):
  79        >>>     pprint(response)
  80        >>>
  81        >>> thread = api.create_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
  82
  83        :param callback function: The callback function
  84            for asynchronous request. (optional)
  85        :param str account_id: The external account number (int) or account ID Guid. (required)
  86        :param str template_id: The ID of the template being accessed. (required)
  87        :param TemplateCustomFields template_custom_fields:
  88        :return: CustomFields
  89                 If the method is called asynchronously,
  90                 returns the request thread.
  91        """
  92
  93        all_params = ['account_id', 'template_id', 'template_custom_fields']
  94        all_params.append('callback')
  95        all_params.append('_return_http_data_only')
  96        all_params.append('_preload_content')
  97        all_params.append('_request_timeout')
  98
  99        params = locals()
 100        for key, val in iteritems(params['kwargs']):
 101            if key not in all_params:
 102                raise TypeError(
 103                    "Got an unexpected keyword argument '%s'"
 104                    " to method create_custom_fields" % key
 105                )
 106            params[key] = val
 107        del params['kwargs']
 108        # verify the required parameter 'account_id' is set
 109        if ('account_id' not in params) or (params['account_id'] is None):
 110            raise ValueError("Missing the required parameter `account_id` when calling `create_custom_fields`")
 111        # verify the required parameter 'template_id' is set
 112        if ('template_id' not in params) or (params['template_id'] is None):
 113            raise ValueError("Missing the required parameter `template_id` when calling `create_custom_fields`")
 114
 115
 116        collection_formats = {}
 117
 118        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
 119        path_params = {}
 120        if 'account_id' in params:
 121            path_params['accountId'] = params['account_id']
 122        if 'template_id' in params:
 123            path_params['templateId'] = params['template_id']
 124
 125        query_params = {}
 126
 127        header_params = {}
 128
 129        form_params = []
 130        local_var_files = {}
 131
 132        body_params = None
 133        if 'template_custom_fields' in params:
 134            body_params = params['template_custom_fields']
 135        # HTTP header `Accept`
 136        header_params['Accept'] = self.api_client.\
 137            select_header_accept(['application/json'])
 138
 139        # Authentication setting
 140        auth_settings = []
 141
 142        return self.api_client.call_api(resource_path, 'POST',
 143                                        path_params,
 144                                        query_params,
 145                                        header_params,
 146                                        body=body_params,
 147                                        post_params=form_params,
 148                                        files=local_var_files,
 149                                        response_type='CustomFields',
 150                                        auth_settings=auth_settings,
 151                                        callback=params.get('callback'),
 152                                        _return_http_data_only=params.get('_return_http_data_only'),
 153                                        _preload_content=params.get('_preload_content', True),
 154                                        _request_timeout=params.get('_request_timeout'),
 155                                        collection_formats=collection_formats)
 156
 157    def create_document_fields(self, account_id, document_id, template_id, **kwargs):
 158        """
 159        Creates custom document fields in an existing template document.
 160        Creates custom document fields in an existing template document.
 161        This method makes a synchronous HTTP request by default. To make an
 162        asynchronous HTTP request, please define a `callback` function
 163        to be invoked when receiving the response.
 164        >>> def callback_function(response):
 165        >>>     pprint(response)
 166        >>>
 167        >>> thread = api.create_document_fields(account_id, document_id, template_id, callback=callback_function)
 168
 169        :param callback function: The callback function
 170            for asynchronous request. (optional)
 171        :param str account_id: The external account number (int) or account ID Guid. (required)
 172        :param str document_id: The ID of the document being accessed. (required)
 173        :param str template_id: The ID of the template being accessed. (required)
 174        :param DocumentFieldsInformation document_fields_information:
 175        :return: DocumentFieldsInformation
 176                 If the method is called asynchronously,
 177                 returns the request thread.
 178        """
 179        kwargs['_return_http_data_only'] = True
 180        if kwargs.get('callback'):
 181            return self.create_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
 182        else:
 183            (data) = self.create_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
 184            return data
 185
 186    def create_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
 187        """
 188        Creates custom document fields in an existing template document.
 189        Creates custom document fields in an existing template document.
 190        This method makes a synchronous HTTP request by default. To make an
 191        asynchronous HTTP request, please define a `callback` function
 192        to be invoked when receiving the response.
 193        >>> def callback_function(response):
 194        >>>     pprint(response)
 195        >>>
 196        >>> thread = api.create_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
 197
 198        :param callback function: The callback function
 199            for asynchronous request. (optional)
 200        :param str account_id: The external account number (int) or account ID Guid. (required)
 201        :param str document_id: The ID of the document being accessed. (required)
 202        :param str template_id: The ID of the template being accessed. (required)
 203        :param DocumentFieldsInformation document_fields_information:
 204        :return: DocumentFieldsInformation
 205                 If the method is called asynchronously,
 206                 returns the request thread.
 207        """
 208
 209        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
 210        all_params.append('callback')
 211        all_params.append('_return_http_data_only')
 212        all_params.append('_preload_content')
 213        all_params.append('_request_timeout')
 214
 215        params = locals()
 216        for key, val in iteritems(params['kwargs']):
 217            if key not in all_params:
 218                raise TypeError(
 219                    "Got an unexpected keyword argument '%s'"
 220                    " to method create_document_fields" % key
 221                )
 222            params[key] = val
 223        del params['kwargs']
 224        # verify the required parameter 'account_id' is set
 225        if ('account_id' not in params) or (params['account_id'] is None):
 226            raise ValueError("Missing the required parameter `account_id` when calling `create_document_fields`")
 227        # verify the required parameter 'document_id' is set
 228        if ('document_id' not in params) or (params['document_id'] is None):
 229            raise ValueError("Missing the required parameter `document_id` when calling `create_document_fields`")
 230        # verify the required parameter 'template_id' is set
 231        if ('template_id' not in params) or (params['template_id'] is None):
 232            raise ValueError("Missing the required parameter `template_id` when calling `create_document_fields`")
 233
 234
 235        collection_formats = {}
 236
 237        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
 238        path_params = {}
 239        if 'account_id' in params:
 240            path_params['accountId'] = params['account_id']
 241        if 'document_id' in params:
 242            path_params['documentId'] = params['document_id']
 243        if 'template_id' in params:
 244            path_params['templateId'] = params['template_id']
 245
 246        query_params = {}
 247
 248        header_params = {}
 249
 250        form_params = []
 251        local_var_files = {}
 252
 253        body_params = None
 254        if 'document_fields_information' in params:
 255            body_params = params['document_fields_information']
 256        # HTTP header `Accept`
 257        header_params['Accept'] = self.api_client.\
 258            select_header_accept(['application/json'])
 259
 260        # Authentication setting
 261        auth_settings = []
 262
 263        return self.api_client.call_api(resource_path, 'POST',
 264                                        path_params,
 265                                        query_params,
 266                                        header_params,
 267                                        body=body_params,
 268                                        post_params=form_params,
 269                                        files=local_var_files,
 270                                        response_type='DocumentFieldsInformation',
 271                                        auth_settings=auth_settings,
 272                                        callback=params.get('callback'),
 273                                        _return_http_data_only=params.get('_return_http_data_only'),
 274                                        _preload_content=params.get('_preload_content', True),
 275                                        _request_timeout=params.get('_request_timeout'),
 276                                        collection_formats=collection_formats)
 277
 278    def create_edit_view(self, account_id, template_id, **kwargs):
 279        """
 280        Provides a URL to start an edit view of the Template UI
 281        This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI.
 282        This method makes a synchronous HTTP request by default. To make an
 283        asynchronous HTTP request, please define a `callback` function
 284        to be invoked when receiving the response.
 285        >>> def callback_function(response):
 286        >>>     pprint(response)
 287        >>>
 288        >>> thread = api.create_edit_view(account_id, template_id, callback=callback_function)
 289
 290        :param callback function: The callback function
 291            for asynchronous request. (optional)
 292        :param str account_id: The external account number (int) or account ID Guid. (required)
 293        :param str template_id: The ID of the template being accessed. (required)
 294        :param ReturnUrlRequest return_url_request:
 295        :return: ViewUrl
 296                 If the method is called asynchronously,
 297                 returns the request thread.
 298        """
 299        kwargs['_return_http_data_only'] = True
 300        if kwargs.get('callback'):
 301            return self.create_edit_view_with_http_info(account_id, template_id, **kwargs)
 302        else:
 303            (data) = self.create_edit_view_with_http_info(account_id, template_id, **kwargs)
 304            return data
 305
 306    def create_edit_view_with_http_info(self, account_id, template_id, **kwargs):
 307        """
 308        Provides a URL to start an edit view of the Template UI
 309        This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI.
 310        This method makes a synchronous HTTP request by default. To make an
 311        asynchronous HTTP request, please define a `callback` function
 312        to be invoked when receiving the response.
 313        >>> def callback_function(response):
 314        >>>     pprint(response)
 315        >>>
 316        >>> thread = api.create_edit_view_with_http_info(account_id, template_id, callback=callback_function)
 317
 318        :param callback function: The callback function
 319            for asynchronous request. (optional)
 320        :param str account_id: The external account number (int) or account ID Guid. (required)
 321        :param str template_id: The ID of the template being accessed. (required)
 322        :param ReturnUrlRequest return_url_request:
 323        :return: ViewUrl
 324                 If the method is called asynchronously,
 325                 returns the request thread.
 326        """
 327
 328        all_params = ['account_id', 'template_id', 'return_url_request']
 329        all_params.append('callback')
 330        all_params.append('_return_http_data_only')
 331        all_params.append('_preload_content')
 332        all_params.append('_request_timeout')
 333
 334        params = locals()
 335        for key, val in iteritems(params['kwargs']):
 336            if key not in all_params:
 337                raise TypeError(
 338                    "Got an unexpected keyword argument '%s'"
 339                    " to method create_edit_view" % key
 340                )
 341            params[key] = val
 342        del params['kwargs']
 343        # verify the required parameter 'account_id' is set
 344        if ('account_id' not in params) or (params['account_id'] is None):
 345            raise ValueError("Missing the required parameter `account_id` when calling `create_edit_view`")
 346        # verify the required parameter 'template_id' is set
 347        if ('template_id' not in params) or (params['template_id'] is None):
 348            raise ValueError("Missing the required parameter `template_id` when calling `create_edit_view`")
 349
 350
 351        collection_formats = {}
 352
 353        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/edit'.replace('{format}', 'json')
 354        path_params = {}
 355        if 'account_id' in params:
 356            path_params['accountId'] = params['account_id']
 357        if 'template_id' in params:
 358            path_params['templateId'] = params['template_id']
 359
 360        query_params = {}
 361
 362        header_params = {}
 363
 364        form_params = []
 365        local_var_files = {}
 366
 367        body_params = None
 368        if 'return_url_request' in params:
 369            body_params = params['return_url_request']
 370        # HTTP header `Accept`
 371        header_params['Accept'] = self.api_client.\
 372            select_header_accept(['application/json'])
 373
 374        # Authentication setting
 375        auth_settings = []
 376
 377        return self.api_client.call_api(resource_path, 'POST',
 378                                        path_params,
 379                                        query_params,
 380                                        header_params,
 381                                        body=body_params,
 382                                        post_params=form_params,
 383                                        files=local_var_files,
 384                                        response_type='ViewUrl',
 385                                        auth_settings=auth_settings,
 386                                        callback=params.get('callback'),
 387                                        _return_http_data_only=params.get('_return_http_data_only'),
 388                                        _preload_content=params.get('_preload_content', True),
 389                                        _request_timeout=params.get('_request_timeout'),
 390                                        collection_formats=collection_formats)
 391
 392    def create_lock(self, account_id, template_id, **kwargs):
 393        """
 394        Lock a template.
 395        Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template.  ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user).
 396        This method makes a synchronous HTTP request by default. To make an
 397        asynchronous HTTP request, please define a `callback` function
 398        to be invoked when receiving the response.
 399        >>> def callback_function(response):
 400        >>>     pprint(response)
 401        >>>
 402        >>> thread = api.create_lock(account_id, template_id, callback=callback_function)
 403
 404        :param callback function: The callback function
 405            for asynchronous request. (optional)
 406        :param str account_id: The external account number (int) or account ID Guid. (required)
 407        :param str template_id: The ID of the template being accessed. (required)
 408        :param LockRequest lock_request:
 409        :return: LockInformation
 410                 If the method is called asynchronously,
 411                 returns the request thread.
 412        """
 413        kwargs['_return_http_data_only'] = True
 414        if kwargs.get('callback'):
 415            return self.create_lock_with_http_info(account_id, template_id, **kwargs)
 416        else:
 417            (data) = self.create_lock_with_http_info(account_id, template_id, **kwargs)
 418            return data
 419
 420    def create_lock_with_http_info(self, account_id, template_id, **kwargs):
 421        """
 422        Lock a template.
 423        Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template.  ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user).
 424        This method makes a synchronous HTTP request by default. To make an
 425        asynchronous HTTP request, please define a `callback` function
 426        to be invoked when receiving the response.
 427        >>> def callback_function(response):
 428        >>>     pprint(response)
 429        >>>
 430        >>> thread = api.create_lock_with_http_info(account_id, template_id, callback=callback_function)
 431
 432        :param callback function: The callback function
 433            for asynchronous request. (optional)
 434        :param str account_id: The external account number (int) or account ID Guid. (required)
 435        :param str template_id: The ID of the template being accessed. (required)
 436        :param LockRequest lock_request:
 437        :return: LockInformation
 438                 If the method is called asynchronously,
 439                 returns the request thread.
 440        """
 441
 442        all_params = ['account_id', 'template_id', 'lock_request']
 443        all_params.append('callback')
 444        all_params.append('_return_http_data_only')
 445        all_params.append('_preload_content')
 446        all_params.append('_request_timeout')
 447
 448        params = locals()
 449        for key, val in iteritems(params['kwargs']):
 450            if key not in all_params:
 451                raise TypeError(
 452                    "Got an unexpected keyword argument '%s'"
 453                    " to method create_lock" % key
 454                )
 455            params[key] = val
 456        del params['kwargs']
 457        # verify the required parameter 'account_id' is set
 458        if ('account_id' not in params) or (params['account_id'] is None):
 459            raise ValueError("Missing the required parameter `account_id` when calling `create_lock`")
 460        # verify the required parameter 'template_id' is set
 461        if ('template_id' not in params) or (params['template_id'] is None):
 462            raise ValueError("Missing the required parameter `template_id` when calling `create_lock`")
 463
 464
 465        collection_formats = {}
 466
 467        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
 468        path_params = {}
 469        if 'account_id' in params:
 470            path_params['accountId'] = params['account_id']
 471        if 'template_id' in params:
 472            path_params['templateId'] = params['template_id']
 473
 474        query_params = {}
 475
 476        header_params = {}
 477
 478        form_params = []
 479        local_var_files = {}
 480
 481        body_params = None
 482        if 'lock_request' in params:
 483            body_params = params['lock_request']
 484        # HTTP header `Accept`
 485        header_params['Accept'] = self.api_client.\
 486            select_header_accept(['application/json'])
 487
 488        # Authentication setting
 489        auth_settings = []
 490
 491        return self.api_client.call_api(resource_path, 'POST',
 492                                        path_params,
 493                                        query_params,
 494                                        header_params,
 495                                        body=body_params,
 496                                        post_params=form_params,
 497                                        files=local_var_files,
 498                                        response_type='LockInformation',
 499                                        auth_settings=auth_settings,
 500                                        callback=params.get('callback'),
 501                                        _return_http_data_only=params.get('_return_http_data_only'),
 502                                        _preload_content=params.get('_preload_content', True),
 503                                        _request_timeout=params.get('_request_timeout'),
 504                                        collection_formats=collection_formats)
 505
 506    def create_recipients(self, account_id, template_id, **kwargs):
 507        """
 508        Adds tabs for a recipient.
 509        Adds one or more recipients to a template.
 510        This method makes a synchronous HTTP request by default. To make an
 511        asynchronous HTTP request, please define a `callback` function
 512        to be invoked when receiving the response.
 513        >>> def callback_function(response):
 514        >>>     pprint(response)
 515        >>>
 516        >>> thread = api.create_recipients(account_id, template_id, callback=callback_function)
 517
 518        :param callback function: The callback function
 519            for asynchronous request. (optional)
 520        :param str account_id: The external account number (int) or account ID Guid. (required)
 521        :param str template_id: The ID of the template being accessed. (required)
 522        :param str resend_envelope:
 523        :param TemplateRecipients template_recipients:
 524        :return: Recipients
 525                 If the method is called asynchronously,
 526                 returns the request thread.
 527        """
 528        kwargs['_return_http_data_only'] = True
 529        if kwargs.get('callback'):
 530            return self.create_recipients_with_http_info(account_id, template_id, **kwargs)
 531        else:
 532            (data) = self.create_recipients_with_http_info(account_id, template_id, **kwargs)
 533            return data
 534
 535    def create_recipients_with_http_info(self, account_id, template_id, **kwargs):
 536        """
 537        Adds tabs for a recipient.
 538        Adds one or more recipients to a template.
 539        This method makes a synchronous HTTP request by default. To make an
 540        asynchronous HTTP request, please define a `callback` function
 541        to be invoked when receiving the response.
 542        >>> def callback_function(response):
 543        >>>     pprint(response)
 544        >>>
 545        >>> thread = api.create_recipients_with_http_info(account_id, template_id, callback=callback_function)
 546
 547        :param callback function: The callback function
 548            for asynchronous request. (optional)
 549        :param str account_id: The external account number (int) or account ID Guid. (required)
 550        :param str template_id: The ID of the template being accessed. (required)
 551        :param str resend_envelope:
 552        :param TemplateRecipients template_recipients:
 553        :return: Recipients
 554                 If the method is called asynchronously,
 555                 returns the request thread.
 556        """
 557
 558        all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients']
 559        all_params.append('callback')
 560        all_params.append('_return_http_data_only')
 561        all_params.append('_preload_content')
 562        all_params.append('_request_timeout')
 563
 564        params = locals()
 565        for key, val in iteritems(params['kwargs']):
 566            if key not in all_params:
 567                raise TypeError(
 568                    "Got an unexpected keyword argument '%s'"
 569                    " to method create_recipients" % key
 570                )
 571            params[key] = val
 572        del params['kwargs']
 573        # verify the required parameter 'account_id' is set
 574        if ('account_id' not in params) or (params['account_id'] is None):
 575            raise ValueError("Missing the required parameter `account_id` when calling `create_recipients`")
 576        # verify the required parameter 'template_id' is set
 577        if ('template_id' not in params) or (params['template_id'] is None):
 578            raise ValueError("Missing the required parameter `template_id` when calling `create_recipients`")
 579
 580
 581        collection_formats = {}
 582
 583        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
 584        path_params = {}
 585        if 'account_id' in params:
 586            path_params['accountId'] = params['account_id']
 587        if 'template_id' in params:
 588            path_params['templateId'] = params['template_id']
 589
 590        query_params = {}
 591        if 'resend_envelope' in params:
 592            query_params['resend_envelope'] = params['resend_envelope']
 593
 594        header_params = {}
 595
 596        form_params = []
 597        local_var_files = {}
 598
 599        body_params = None
 600        if 'template_recipients' in params:
 601            body_params = params['template_recipients']
 602        # HTTP header `Accept`
 603        header_params['Accept'] = self.api_client.\
 604            select_header_accept(['application/json'])
 605
 606        # Authentication setting
 607        auth_settings = []
 608
 609        return self.api_client.call_api(resource_path, 'POST',
 610                                        path_params,
 611                                        query_params,
 612                                        header_params,
 613                                        body=body_params,
 614                                        post_params=form_params,
 615                                        files=local_var_files,
 616                                        response_type='Recipients',
 617                                        auth_settings=auth_settings,
 618                                        callback=params.get('callback'),
 619                                        _return_http_data_only=params.get('_return_http_data_only'),
 620                                        _preload_content=params.get('_preload_content', True),
 621                                        _request_timeout=params.get('_request_timeout'),
 622                                        collection_formats=collection_formats)
 623
 624    def create_tabs(self, account_id, recipient_id, template_id, **kwargs):
 625        """
 626        Adds tabs for a recipient.
 627        Adds one or more tabs for a recipient.
 628        This method makes a synchronous HTTP request by default. To make an
 629        asynchronous HTTP request, please define a `callback` function
 630        to be invoked when receiving the response.
 631        >>> def callback_function(response):
 632        >>>     pprint(response)
 633        >>>
 634        >>> thread = api.create_tabs(account_id, recipient_id, template_id, callback=callback_function)
 635
 636        :param callback function: The callback function
 637            for asynchronous request. (optional)
 638        :param str account_id: The external account number (int) or account ID Guid. (required)
 639        :param str recipient_id: The ID of the recipient being accessed. (required)
 640        :param str template_id: The ID of the template being accessed. (required)
 641        :param TemplateTabs template_tabs:
 642        :return: Tabs
 643                 If the method is called asynchronously,
 644                 returns the request thread.
 645        """
 646        kwargs['_return_http_data_only'] = True
 647        if kwargs.get('callback'):
 648            return self.create_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
 649        else:
 650            (data) = self.create_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
 651            return data
 652
 653    def create_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
 654        """
 655        Adds tabs for a recipient.
 656        Adds one or more tabs for a recipient.
 657        This method makes a synchronous HTTP request by default. To make an
 658        asynchronous HTTP request, please define a `callback` function
 659        to be invoked when receiving the response.
 660        >>> def callback_function(response):
 661        >>>     pprint(response)
 662        >>>
 663        >>> thread = api.create_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
 664
 665        :param callback function: The callback function
 666            for asynchronous request. (optional)
 667        :param str account_id: The external account number (int) or account ID Guid. (required)
 668        :param str recipient_id: The ID of the recipient being accessed. (required)
 669        :param str template_id: The ID of the template being accessed. (required)
 670        :param TemplateTabs template_tabs:
 671        :return: Tabs
 672                 If the method is called asynchronously,
 673                 returns the request thread.
 674        """
 675
 676        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
 677        all_params.append('callback')
 678        all_params.append('_return_http_data_only')
 679        all_params.append('_preload_content')
 680        all_params.append('_request_timeout')
 681
 682        params = locals()
 683        for key, val in iteritems(params['kwargs']):
 684            if key not in all_params:
 685                raise TypeError(
 686                    "Got an unexpected keyword argument '%s'"
 687                    " to method create_tabs" % key
 688                )
 689            params[key] = val
 690        del params['kwargs']
 691        # verify the required parameter 'account_id' is set
 692        if ('account_id' not in params) or (params['account_id'] is None):
 693            raise ValueError("Missing the required parameter `account_id` when calling `create_tabs`")
 694        # verify the required parameter 'recipient_id' is set
 695        if ('recipient_id' not in params) or (params['recipient_id'] is None):
 696            raise ValueError("Missing the required parameter `recipient_id` when calling `create_tabs`")
 697        # verify the required parameter 'template_id' is set
 698        if ('template_id' not in params) or (params['template_id'] is None):
 699            raise ValueError("Missing the required parameter `template_id` when calling `create_tabs`")
 700
 701
 702        collection_formats = {}
 703
 704        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
 705        path_params = {}
 706        if 'account_id' in params:
 707            path_params['accountId'] = params['account_id']
 708        if 'recipient_id' in params:
 709            path_params['recipientId'] = params['recipient_id']
 710        if 'template_id' in params:
 711            path_params['templateId'] = params['template_id']
 712
 713        query_params = {}
 714
 715        header_params = {}
 716
 717        form_params = []
 718        local_var_files = {}
 719
 720        body_params = None
 721        if 'template_tabs' in params:
 722            body_params = params['template_tabs']
 723        # HTTP header `Accept`
 724        header_params['Accept'] = self.api_client.\
 725            select_header_accept(['application/json'])
 726
 727        # Authentication setting
 728        auth_settings = []
 729
 730        return self.api_client.call_api(resource_path, 'POST',
 731                                        path_params,
 732                                        query_params,
 733                                        header_params,
 734                                        body=body_params,
 735                                        post_params=form_params,
 736                                        files=local_var_files,
 737                                        response_type='Tabs',
 738                                        auth_settings=auth_settings,
 739                                        callback=params.get('callback'),
 740                                        _return_http_data_only=params.get('_return_http_data_only'),
 741                                        _preload_content=params.get('_preload_content', True),
 742                                        _request_timeout=params.get('_request_timeout'),
 743                                        collection_formats=collection_formats)
 744
 745    def create_template(self, account_id, **kwargs):
 746        """
 747        Creates an envelope from a template.
 748        Creates a template definition using a multipart request.  ###Template Email Subject Merge Fields  Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template.  The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line.  Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject.  To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_UserName]]  Example:  `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",`  To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_Email]]  Example:  `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",`   In both cases the <roleName> is the recipient's contents of the `roleName` property in the template.  For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject.
 749        This method makes a synchronous HTTP request by default. To make an
 750        asynchronous HTTP request, please define a `callback` function
 751        to be invoked when receiving the response.
 752        >>> def callback_function(response):
 753        >>>     pprint(response)
 754        >>>
 755        >>> thread = api.create_template(account_id, callback=callback_function)
 756
 757        :param callback function: The callback function
 758            for asynchronous request. (optional)
 759        :param str account_id: The external account number (int) or account ID Guid. (required)
 760        :param EnvelopeTemplate envelope_template:
 761        :return: TemplateSummary
 762                 If the method is called asynchronously,
 763                 returns the request thread.
 764        """
 765        kwargs['_return_http_data_only'] = True
 766        if kwargs.get('callback'):
 767            return self.create_template_with_http_info(account_id, **kwargs)
 768        else:
 769            (data) = self.create_template_with_http_info(account_id, **kwargs)
 770            return data
 771
 772    def create_template_with_http_info(self, account_id, **kwargs):
 773        """
 774        Creates an envelope from a template.
 775        Creates a template definition using a multipart request.  ###Template Email Subject Merge Fields  Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template.  The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line.  Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject.  To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_UserName]]  Example:  `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",`  To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_Email]]  Example:  `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",`   In both cases the <roleName> is the recipient's contents of the `roleName` property in the template.  For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject.
 776        This method makes a synchronous HTTP request by default. To make an
 777        asynchronous HTTP request, please define a `callback` function
 778        to be invoked when receiving the response.
 779        >>> def callback_function(response):
 780        >>>     pprint(response)
 781        >>>
 782        >>> thread = api.create_template_with_http_info(account_id, callback=callback_function)
 783
 784        :param callback function: The callback function
 785            for asynchronous request. (optional)
 786        :param str account_id: The external account number (int) or account ID Guid. (required)
 787        :param EnvelopeTemplate envelope_template:
 788        :return: TemplateSummary
 789                 If the method is called asynchronously,
 790                 returns the request thread.
 791        """
 792
 793        all_params = ['account_id', 'envelope_template']
 794        all_params.append('callback')
 795        all_params.append('_return_http_data_only')
 796        all_params.append('_preload_content')
 797        all_params.append('_request_timeout')
 798
 799        params = locals()
 800        for key, val in iteritems(params['kwargs']):
 801            if key not in all_params:
 802                raise TypeError(
 803                    "Got an unexpected keyword argument '%s'"
 804                    " to method create_template" % key
 805                )
 806            params[key] = val
 807        del params['kwargs']
 808        # verify the required parameter 'account_id' is set
 809        if ('account_id' not in params) or (params['account_id'] is None):
 810            raise ValueError("Missing the required parameter `account_id` when calling `create_template`")
 811
 812
 813        collection_formats = {}
 814
 815        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
 816        path_params = {}
 817        if 'account_id' in params:
 818            path_params['accountId'] = params['account_id']
 819
 820        query_params = {}
 821
 822        header_params = {}
 823
 824        form_params = []
 825        local_var_files = {}
 826
 827        body_params = None
 828        if 'envelope_template' in params:
 829            body_params = params['envelope_template']
 830        # HTTP header `Accept`
 831        header_params['Accept'] = self.api_client.\
 832            select_header_accept(['application/json'])
 833
 834        # Authentication setting
 835        auth_settings = []
 836
 837        return self.api_client.call_api(resource_path, 'POST',
 838                                        path_params,
 839                                        query_params,
 840                                        header_params,
 841                                        body=body_params,
 842                                        post_params=form_params,
 843                                        files=local_var_files,
 844                                        response_type='TemplateSummary',
 845                                        auth_settings=auth_settings,
 846                                        callback=params.get('callback'),
 847                                        _return_http_data_only=params.get('_return_http_data_only'),
 848                                        _preload_content=params.get('_preload_content', True),
 849                                        _request_timeout=params.get('_request_timeout'),
 850                                        collection_formats=collection_formats)
 851
 852    def create_template_document_responsive_html_preview(self, account_id, document_id, template_id, **kwargs):
 853        """
 854        Post Responsive HTML Preview for a document in a template.
 855        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document.
 856        This method makes a synchronous HTTP request by default. To make an
 857        asynchronous HTTP request, please define a `callback` function
 858        to be invoked when receiving the response.
 859        >>> def callback_function(response):
 860        >>>     pprint(response)
 861        >>>
 862        >>> thread = api.create_template_document_responsive_html_preview(account_id, document_id, template_id, callback=callback_function)
 863
 864        :param callback function: The callback function
 865            for asynchronous request. (optional)
 866        :param str account_id: The external account number (int) or account ID Guid. (required)
 867        :param str document_id: The ID of the document being accessed. (required)
 868        :param str template_id: The ID of the template being accessed. (required)
 869        :param DocumentHtmlDefinition document_html_definition:
 870        :return: DocumentHtmlDefinitions
 871                 If the method is called asynchronously,
 872                 returns the request thread.
 873        """
 874        kwargs['_return_http_data_only'] = True
 875        if kwargs.get('callback'):
 876            return self.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, **kwargs)
 877        else:
 878            (data) = self.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, **kwargs)
 879            return data
 880
 881    def create_template_document_responsive_html_preview_with_http_info(self, account_id, document_id, template_id, **kwargs):
 882        """
 883        Post Responsive HTML Preview for a document in a template.
 884        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document.
 885        This method makes a synchronous HTTP request by default. To make an
 886        asynchronous HTTP request, please define a `callback` function
 887        to be invoked when receiving the response.
 888        >>> def callback_function(response):
 889        >>>     pprint(response)
 890        >>>
 891        >>> thread = api.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, callback=callback_function)
 892
 893        :param callback function: The callback function
 894            for asynchronous request. (optional)
 895        :param str account_id: The external account number (int) or account ID Guid. (required)
 896        :param str document_id: The ID of the document being accessed. (required)
 897        :param str template_id: The ID of the template being accessed. (required)
 898        :param DocumentHtmlDefinition document_html_definition:
 899        :return: DocumentHtmlDefinitions
 900                 If the method is called asynchronously,
 901                 returns the request thread.
 902        """
 903
 904        all_params = ['account_id', 'document_id', 'template_id', 'document_html_definition']
 905        all_params.append('callback')
 906        all_params.append('_return_http_data_only')
 907        all_params.append('_preload_content')
 908        all_params.append('_request_timeout')
 909
 910        params = locals()
 911        for key, val in iteritems(params['kwargs']):
 912            if key not in all_params:
 913                raise TypeError(
 914                    "Got an unexpected keyword argument '%s'"
 915                    " to method create_template_document_responsive_html_preview" % key
 916                )
 917            params[key] = val
 918        del params['kwargs']
 919        # verify the required parameter 'account_id' is set
 920        if ('account_id' not in params) or (params['account_id'] is None):
 921            raise ValueError("Missing the required parameter `account_id` when calling `create_template_document_responsive_html_preview`")
 922        # verify the required parameter 'document_id' is set
 923        if ('document_id' not in params) or (params['document_id'] is None):
 924            raise ValueError("Missing the required parameter `document_id` when calling `create_template_document_responsive_html_preview`")
 925        # verify the required parameter 'template_id' is set
 926        if ('template_id' not in params) or (params['template_id'] is None):
 927            raise ValueError("Missing the required parameter `template_id` when calling `create_template_document_responsive_html_preview`")
 928
 929
 930        collection_formats = {}
 931
 932        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/responsive_html_preview'.replace('{format}', 'json')
 933        path_params = {}
 934        if 'account_id' in params:
 935            path_params['accountId'] = params['account_id']
 936        if 'document_id' in params:
 937            path_params['documentId'] = params['document_id']
 938        if 'template_id' in params:
 939            path_params['templateId'] = params['template_id']
 940
 941        query_params = {}
 942
 943        header_params = {}
 944
 945        form_params = []
 946        local_var_files = {}
 947
 948        body_params = None
 949        if 'document_html_definition' in params:
 950            body_params = params['document_html_definition']
 951        # HTTP header `Accept`
 952        header_params['Accept'] = self.api_client.\
 953            select_header_accept(['application/json'])
 954
 955        # Authentication setting
 956        auth_settings = []
 957
 958        return self.api_client.call_api(resource_path, 'POST',
 959                                        path_params,
 960                                        query_params,
 961                                        header_params,
 962                                        body=body_params,
 963                                        post_params=form_params,
 964                                        files=local_var_files,
 965                                        response_type='DocumentHtmlDefinitions',
 966                                        auth_settings=auth_settings,
 967                                        callback=params.get('callback'),
 968                                        _return_http_data_only=params.get('_return_http_data_only'),
 969                                        _preload_content=params.get('_preload_content', True),
 970                                        _request_timeout=params.get('_request_timeout'),
 971                                        collection_formats=collection_formats)
 972
 973    def create_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
 974        """
 975        Adds the tabs to a tempate
 976        Adds tabs to the document specified by `documentId` in the template specified by `templateId`.  In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/templates/templatedocumenttabs/create/#definition__templatetabs_prefilltabs), your request body might look like this:  ``` {   \"prefillTabs\": {     \"textTabs\": [       {         \"value\": \"a prefill text tab\",         \"pageNumber\": \"1\",         \"documentId\": \"1\",         \"xPosition\": 316,         \"yPosition\": 97       }     ]   } } ``` 
 977        This method makes a synchronous HTTP request by default. To make an
 978        asynchronous HTTP request, please define a `callback` function
 979        to be invoked when receiving the response.
 980        >>> def callback_function(response):
 981        >>>     pprint(response)
 982        >>>
 983        >>> thread = api.create_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
 984
 985        :param callback function: The callback function
 986            for asynchronous request. (optional)
 987        :param str account_id: The external account number (int) or account ID Guid. (required)
 988        :param str document_id: The ID of the document being accessed. (required)
 989        :param str template_id: The ID of the template being accessed. (required)
 990        :param TemplateTabs template_tabs:
 991        :return: Tabs
 992                 If the method is called asynchronously,
 993                 returns the request thread.
 994        """
 995        kwargs['_return_http_data_only'] = True
 996        if kwargs.get('callback'):
 997            return self.create_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
 998        else:
 999            (data) = self.create_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
1000            return data
1001
1002    def create_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
1003        """
1004        Adds the tabs to a tempate
1005        Adds tabs to the document specified by `documentId` in the template specified by `templateId`.  In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/templates/templatedocumenttabs/create/#definition__templatetabs_prefilltabs), your request body might look like this:  ``` {   \"prefillTabs\": {     \"textTabs\": [       {         \"value\": \"a prefill text tab\",         \"pageNumber\": \"1\",         \"documentId\": \"1\",         \"xPosition\": 316,         \"yPosition\": 97       }     ]   } } ``` 
1006        This method makes a synchronous HTTP request by default. To make an
1007        asynchronous HTTP request, please define a `callback` function
1008        to be invoked when receiving the response.
1009        >>> def callback_function(response):
1010        >>>     pprint(response)
1011        >>>
1012        >>> thread = api.create_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
1013
1014        :param callback function: The callback function
1015            for asynchronous request. (optional)
1016        :param str account_id: The external account number (int) or account ID Guid. (required)
1017        :param str document_id: The ID of the document being accessed. (required)
1018        :param str template_id: The ID of the template being accessed. (required)
1019        :param TemplateTabs template_tabs:
1020        :return: Tabs
1021                 If the method is called asynchronously,
1022                 returns the request thread.
1023        """
1024
1025        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
1026        all_params.append('callback')
1027        all_params.append('_return_http_data_only')
1028        all_params.append('_preload_content')
1029        all_params.append('_request_timeout')
1030
1031        params = locals()
1032        for key, val in iteritems(params['kwargs']):
1033            if key not in all_params:
1034                raise TypeError(
1035                    "Got an unexpected keyword argument '%s'"
1036                    " to method create_template_document_tabs" % key
1037                )
1038            params[key] = val
1039        del params['kwargs']
1040        # verify the required parameter 'account_id' is set
1041        if ('account_id' not in params) or (params['account_id'] is None):
1042            raise ValueError("Missing the required parameter `account_id` when calling `create_template_document_tabs`")
1043        # verify the required parameter 'document_id' is set
1044        if ('document_id' not in params) or (params['document_id'] is None):
1045            raise ValueError("Missing the required parameter `document_id` when calling `create_template_document_tabs`")
1046        # verify the required parameter 'template_id' is set
1047        if ('template_id' not in params) or (params['template_id'] is None):
1048            raise ValueError("Missing the required parameter `template_id` when calling `create_template_document_tabs`")
1049
1050
1051        collection_formats = {}
1052
1053        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
1054        path_params = {}
1055        if 'account_id' in params:
1056            path_params['accountId'] = params['account_id']
1057        if 'document_id' in params:
1058            path_params['documentId'] = params['document_id']
1059        if 'template_id' in params:
1060            path_params['templateId'] = params['template_id']
1061
1062        query_params = {}
1063
1064        header_params = {}
1065
1066        form_params = []
1067        local_var_files = {}
1068
1069        body_params = None
1070        if 'template_tabs' in params:
1071            body_params = params['template_tabs']
1072        # HTTP header `Accept`
1073        header_params['Accept'] = self.api_client.\
1074            select_header_accept(['application/json'])
1075
1076        # Authentication setting
1077        auth_settings = []
1078
1079        return self.api_client.call_api(resource_path, 'POST',
1080                                        path_params,
1081                                        query_params,
1082                                        header_params,
1083                                        body=body_params,
1084                                        post_params=form_params,
1085                                        files=local_var_files,
1086                                        response_type='Tabs',
1087                                        auth_settings=auth_settings,
1088                                        callback=params.get('callback'),
1089                                        _return_http_data_only=params.get('_return_http_data_only'),
1090                                        _preload_content=params.get('_preload_content', True),
1091                                        _request_timeout=params.get('_request_timeout'),
1092                                        collection_formats=collection_formats)
1093
1094    def create_template_recipient_preview(self, account_id, template_id, **kwargs):
1095        """
1096        Provides a URL to start a recipient view of the Envelope UI
1097        This method returns a URL for a template recipient preview  in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience.  For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents).
1098        This method makes a synchronous HTTP request by default. To make an
1099        asynchronous HTTP request, please define a `callback` function
1100        to be invoked when receiving the response.
1101        >>> def callback_function(response):
1102        >>>     pprint(response)
1103        >>>
1104        >>> thread = api.create_template_recipient_preview(account_id, template_id, callback=callback_function)
1105
1106        :param callback function: The callback function
1107            for asynchronous request. (optional)
1108        :param str account_id: The external account number (int) or account ID Guid. (required)
1109        :param str template_id: The ID of the template being accessed. (required)
1110        :param RecipientPreviewRequest recipient_preview_request:
1111        :return: ViewUrl
1112                 If the method is called asynchronously,
1113                 returns the request thread.
1114        """
1115        kwargs['_return_http_data_only'] = True
1116        if kwargs.get('callback'):
1117            return self.create_template_recipient_preview_with_http_info(account_id, template_id, **kwargs)
1118        else:
1119            (data) = self.create_template_recipient_preview_with_http_info(account_id, template_id, **kwargs)
1120            return data
1121
1122    def create_template_recipient_preview_with_http_info(self, account_id, template_id, **kwargs):
1123        """
1124        Provides a URL to start a recipient view of the Envelope UI
1125        This method returns a URL for a template recipient preview  in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience.  For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents).
1126        This method makes a synchronous HTTP request by default. To make an
1127        asynchronous HTTP request, please define a `callback` function
1128        to be invoked when receiving the response.
1129        >>> def callback_function(response):
1130        >>>     pprint(response)
1131        >>>
1132        >>> thread = api.create_template_recipient_preview_with_http_info(account_id, template_id, callback=callback_function)
1133
1134        :param callback function: The callback function
1135            for asynchronous request. (optional)
1136        :param str account_id: The external account number (int) or account ID Guid. (required)
1137        :param str template_id: The ID of the template being accessed. (required)
1138        :param RecipientPreviewRequest recipient_preview_request:
1139        :return: ViewUrl
1140                 If the method is called asynchronously,
1141                 returns the request thread.
1142        """
1143
1144        all_params = ['account_id', 'template_id', 'recipient_preview_request']
1145        all_params.append('callback')
1146        all_params.append('_return_http_data_only')
1147        all_params.append('_preload_content')
1148        all_params.append('_request_timeout')
1149
1150        params = locals()
1151        for key, val in iteritems(params['kwargs']):
1152            if key not in all_params:
1153                raise TypeError(
1154                    "Got an unexpected keyword argument '%s'"
1155                    " to method create_template_recipient_preview" % key
1156                )
1157            params[key] = val
1158        del params['kwargs']
1159        # verify the required parameter 'account_id' is set
1160        if ('account_id' not in params) or (params['account_id'] is None):
1161            raise ValueError("Missing the required parameter `account_id` when calling `create_template_recipient_preview`")
1162        # verify the required parameter 'template_id' is set
1163        if ('template_id' not in params) or (params['template_id'] is None):
1164            raise ValueError("Missing the required parameter `template_id` when calling `create_template_recipient_preview`")
1165
1166
1167        collection_formats = {}
1168
1169        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/recipient_preview'.replace('{format}', 'json')
1170        path_params = {}
1171        if 'account_id' in params:
1172            path_params['accountId'] = params['account_id']
1173        if 'template_id' in params:
1174            path_params['templateId'] = params['template_id']
1175
1176        query_params = {}
1177
1178        header_params = {}
1179
1180        form_params = []
1181        local_var_files = {}
1182
1183        body_params = None
1184        if 'recipient_preview_request' in params:
1185            body_params = params['recipient_preview_request']
1186        # HTTP header `Accept`
1187        header_params['Accept'] = self.api_client.\
1188            select_header_accept(['application/json'])
1189
1190        # Authentication setting
1191        auth_settings = []
1192
1193        return self.api_client.call_api(resource_path, 'POST',
1194                                        path_params,
1195                                        query_params,
1196                                        header_params,
1197                                        body=body_params,
1198                                        post_params=form_params,
1199                                        files=local_var_files,
1200                                        response_type='ViewUrl',
1201                                        auth_settings=auth_settings,
1202                                        callback=params.get('callback'),
1203                                        _return_http_data_only=params.get('_return_http_data_only'),
1204                                        _preload_content=params.get('_preload_content', True),
1205                                        _request_timeout=params.get('_request_timeout'),
1206                                        collection_formats=collection_formats)
1207
1208    def create_template_responsive_html_preview(self, account_id, template_id, **kwargs):
1209        """
1210        Get Responsive HTML Preview for all documents in a template.
1211        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents.
1212        This method makes a synchronous HTTP request by default. To make an
1213        asynchronous HTTP request, please define a `callback` function
1214        to be invoked when receiving the response.
1215        >>> def callback_function(response):
1216        >>>     pprint(response)
1217        >>>
1218        >>> thread = api.create_template_responsive_html_preview(account_id, template_id, callback=callback_function)
1219
1220        :param callback function: The callback function
1221            for asynchronous request. (optional)
1222        :param str account_id: The external account number (int) or account ID Guid. (required)
1223        :param str template_id: The ID of the template being accessed. (required)
1224        :param DocumentHtmlDefinition document_html_definition:
1225        :return: DocumentHtmlDefinitions
1226                 If the method is called asynchronously,
1227                 returns the request thread.
1228        """
1229        kwargs['_return_http_data_only'] = True
1230        if kwargs.get('callback'):
1231            return self.create_template_responsive_html_preview_with_http_info(account_id, template_id, **kwargs)
1232        else:
1233            (data) = self.create_template_responsive_html_preview_with_http_info(account_id, template_id, **kwargs)
1234            return data
1235
1236    def create_template_responsive_html_preview_with_http_info(self, account_id, template_id, **kwargs):
1237        """
1238        Get Responsive HTML Preview for all documents in a template.
1239        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents.
1240        This method makes a synchronous HTTP request by default. To make an
1241        asynchronous HTTP request, please define a `callback` function
1242        to be invoked when receiving the response.
1243        >>> def callback_function(response):
1244        >>>     pprint(response)
1245        >>>
1246        >>> thread = api.create_template_responsive_html_preview_with_http_info(account_id, template_id, callback=callback_function)
1247
1248        :param callback function: The callback function
1249            for asynchronous request. (optional)
1250        :param str account_id: The external account number (int) or account ID Guid. (required)
1251        :param str template_id: The ID of the template being accessed. (required)
1252        :param DocumentHtmlDefinition document_html_definition:
1253        :return: DocumentHtmlDefinitions
1254                 If the method is called asynchronously,
1255                 returns the request thread.
1256        """
1257
1258        all_params = ['account_id', 'template_id', 'document_html_definition']
1259        all_params.append('callback')
1260        all_params.append('_return_http_data_only')
1261        all_params.append('_preload_content')
1262        all_params.append('_request_timeout')
1263
1264        params = locals()
1265        for key, val in iteritems(params['kwargs']):
1266            if key not in all_params:
1267                raise TypeError(
1268                    "Got an unexpected keyword argument '%s'"
1269                    " to method create_template_responsive_html_preview" % key
1270                )
1271            params[key] = val
1272        del params['kwargs']
1273        # verify the required parameter 'account_id' is set
1274        if ('account_id' not in params) or (params['account_id'] is None):
1275            raise ValueError("Missing the required parameter `account_id` when calling `create_template_responsive_html_preview`")
1276        # verify the required parameter 'template_id' is set
1277        if ('template_id' not in params) or (params['template_id'] is None):
1278            raise ValueError("Missing the required parameter `template_id` when calling `create_template_responsive_html_preview`")
1279
1280
1281        collection_formats = {}
1282
1283        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/responsive_html_preview'.replace('{format}', 'json')
1284        path_params = {}
1285        if 'account_id' in params:
1286            path_params['accountId'] = params['account_id']
1287        if 'template_id' in params:
1288            path_params['templateId'] = params['template_id']
1289
1290        query_params = {}
1291
1292        header_params = {}
1293
1294        form_params = []
1295        local_var_files = {}
1296
1297        body_params = None
1298        if 'document_html_definition' in params:
1299            body_params = params['document_html_definition']
1300        # HTTP header `Accept`
1301        header_params['Accept'] = self.api_client.\
1302            select_header_accept(['application/json'])
1303
1304        # Authentication setting
1305        auth_settings = []
1306
1307        return self.api_client.call_api(resource_path, 'POST',
1308                                        path_params,
1309                                        query_params,
1310                                        header_params,
1311                                        body=body_params,
1312                                        post_params=form_params,
1313                                        files=local_var_files,
1314                                        response_type='DocumentHtmlDefinitions',
1315                                        auth_settings=auth_settings,
1316                                        callback=params.get('callback'),
1317                                        _return_http_data_only=params.get('_return_http_data_only'),
1318                                        _preload_content=params.get('_preload_content', True),
1319                                        _request_timeout=params.get('_request_timeout'),
1320                                        collection_formats=collection_formats)
1321
1322    def delete_bulk_recipients(self, account_id, recipient_id, template_id, **kwargs):
1323        """
1324        Deletes the bulk recipient list on a template.
1325        Deletes the bulk recipient list on a template.
1326        This method makes a synchronous HTTP request by default. To make an
1327        asynchronous HTTP request, please define a `callback` function
1328        to be invoked when receiving the response.
1329        >>> def callback_function(response):
1330        >>>     pprint(response)
1331        >>>
1332        >>> thread = api.delete_bulk_recipients(account_id, recipient_id, template_id, callback=callback_function)
1333
1334        :param callback function: The callback function
1335            for asynchronous request. (optional)
1336        :param str account_id: The external account number (int) or account ID Guid. (required)
1337        :param str recipient_id: The ID of the recipient being accessed. (required)
1338        :param str template_id: The ID of the template being accessed. (required)
1339        :return: BulkRecipientsUpdateResponse
1340                 If the method is called asynchronously,
1341                 returns the request thread.
1342        """
1343        kwargs['_return_http_data_only'] = True
1344        if kwargs.get('callback'):
1345            return self.delete_bulk_recipients_with_http_info(account_id, recipient_id, template_id, **kwargs)
1346        else:
1347            (data) = self.delete_bulk_recipients_with_http_info(account_id, recipient_id, template_id, **kwargs)
1348            return data
1349
1350    def delete_bulk_recipients_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
1351        """
1352        Deletes the bulk recipient list on a template.
1353        Deletes the bulk recipient list on a template.
1354        This method makes a synchronous HTTP request by default. To make an
1355        asynchronous HTTP request, please define a `callback` function
1356        to be invoked when receiving the response.
1357        >>> def callback_function(response):
1358        >>>     pprint(response)
1359        >>>
1360        >>> thread = api.delete_bulk_recipients_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
1361
1362        :param callback function: The callback function
1363            for asynchronous request. (optional)
1364        :param str account_id: The external account number (int) or account ID Guid. (required)
1365        :param str recipient_id: The ID of the recipient being accessed. (required)
1366        :param str template_id: The ID of the template being accessed. (required)
1367        :return: BulkRecipientsUpdateResponse
1368                 If the method is called asynchronously,
1369                 returns the request thread.
1370        """
1371
1372        all_params = ['account_id', 'recipient_id', 'template_id']
1373        all_params.append('callback')
1374        all_params.append('_return_http_data_only')
1375        all_params.append('_preload_content')
1376        all_params.append('_request_timeout')
1377
1378        params = locals()
1379        for key, val in iteritems(params['kwargs']):
1380            if key not in all_params:
1381                raise TypeError(
1382                    "Got an unexpected keyword argument '%s'"
1383                    " to method delete_bulk_recipients" % key
1384                )
1385            params[key] = val
1386        del params['kwargs']
1387        # verify the required parameter 'account_id' is set
1388        if ('account_id' not in params) or (params['account_id'] is None):
1389            raise ValueError("Missing the required parameter `account_id` when calling `delete_bulk_recipients`")
1390        # verify the required parameter 'recipient_id' is set
1391        if ('recipient_id' not in params) or (params['recipient_id'] is None):
1392            raise ValueError("Missing the required parameter `recipient_id` when calling `delete_bulk_recipients`")
1393        # verify the required parameter 'template_id' is set
1394        if ('template_id' not in params) or (params['template_id'] is None):
1395            raise ValueError("Missing the required parameter `template_id` when calling `delete_bulk_recipients`")
1396
1397
1398        collection_formats = {}
1399
1400        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/bulk_recipients'.replace('{format}', 'json')
1401        path_params = {}
1402        if 'account_id' in params:
1403            path_params['accountId'] = params['account_id']
1404        if 'recipient_id' in params:
1405            path_params['recipientId'] = params['recipient_id']
1406        if 'template_id' in params:
1407            path_params['templateId'] = params['template_id']
1408
1409        query_params = {}
1410
1411        header_params = {}
1412
1413        form_params = []
1414        local_var_files = {}
1415
1416        body_params = None
1417        # HTTP header `Accept`
1418        header_params['Accept'] = self.api_client.\
1419            select_header_accept(['application/json'])
1420
1421        # Authentication setting
1422        auth_settings = []
1423
1424        return self.api_client.call_api(resource_path, 'DELETE',
1425                                        path_params,
1426                                        query_params,
1427                                        header_params,
1428                                        body=body_params,
1429                                        post_params=form_params,
1430                                        files=local_var_files,
1431                                        response_type='BulkRecipientsUpdateResponse',
1432                                        auth_settings=auth_settings,
1433                                        callback=params.get('callback'),
1434                                        _return_http_data_only=params.get('_return_http_data_only'),
1435                                        _preload_content=params.get('_preload_content', True),
1436                                        _request_timeout=params.get('_request_timeout'),
1437                                        collection_formats=collection_formats)
1438
1439    def delete_custom_fields(self, account_id, template_id, **kwargs):
1440        """
1441        Deletes envelope custom fields in a template.
1442        Deletes envelope custom fields in a template.
1443        This method makes a synchronous HTTP request by default. To make an
1444        asynchronous HTTP request, please define a `callback` function
1445        to be invoked when receiving the response.
1446        >>> def callback_function(response):
1447        >>>     pprint(response)
1448        >>>
1449        >>> thread = api.delete_custom_fields(account_id, template_id, callback=callback_function)
1450
1451        :param callback function: The callback function
1452            for asynchronous request. (optional)
1453        :param str account_id: The external account number (int) or account ID Guid. (required)
1454        :param str template_id: The ID of the template being accessed. (required)
1455        :param TemplateCustomFields template_custom_fields:
1456        :return: CustomFields
1457                 If the method is called asynchronously,
1458                 returns the request thread.
1459        """
1460        kwargs['_return_http_data_only'] = True
1461        if kwargs.get('callback'):
1462            return self.delete_custom_fields_with_http_info(account_id, template_id, **kwargs)
1463        else:
1464            (data) = self.delete_custom_fields_with_http_info(account_id, template_id, **kwargs)
1465            return data
1466
1467    def delete_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
1468        """
1469        Deletes envelope custom fields in a template.
1470        Deletes envelope custom fields in a template.
1471        This method makes a synchronous HTTP request by default. To make an
1472        asynchronous HTTP request, please define a `callback` function
1473        to be invoked when receiving the response.
1474        >>> def callback_function(response):
1475        >>>     pprint(response)
1476        >>>
1477        >>> thread = api.delete_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
1478
1479        :param callback function: The callback function
1480            for asynchronous request. (optional)
1481        :param str account_id: The external account number (int) or account ID Guid. (required)
1482        :param str template_id: The ID of the template being accessed. (required)
1483        :param TemplateCustomFields template_custom_fields:
1484        :return: CustomFields
1485                 If the method is called asynchronously,
1486                 returns the request thread.
1487        """
1488
1489        all_params = ['account_id', 'template_id', 'template_custom_fields']
1490        all_params.append('callback')
1491        all_params.append('_return_http_data_only')
1492        all_params.append('_preload_content')
1493        all_params.append('_request_timeout')
1494
1495        params = locals()
1496        for key, val in iteritems(params['kwargs']):
1497            if key not in all_params:
1498                raise TypeError(
1499                    "Got an unexpected keyword argument '%s'"
1500                    " to method delete_custom_fields" % key
1501                )
1502            params[key] = val
1503        del params['kwargs']
1504        # verify the required parameter 'account_id' is set
1505        if ('account_id' not in params) or (params['account_id'] is None):
1506            raise ValueError("Missing the required parameter `account_id` when calling `delete_custom_fields`")
1507        # verify the required parameter 'template_id' is set
1508        if ('template_id' not in params) or (params['template_id'] is None):
1509            raise ValueError("Missing the required parameter `template_id` when calling `delete_custom_fields`")
1510
1511
1512        collection_formats = {}
1513
1514        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
1515        path_params = {}
1516        if 'account_id' in params:
1517            path_params['accountId'] = params['account_id']
1518        if 'template_id' in params:
1519            path_params['templateId'] = params['template_id']
1520
1521        query_params = {}
1522
1523        header_params = {}
1524
1525        form_params = []
1526        local_var_files = {}
1527
1528        body_params = None
1529        if 'template_custom_fields' in params:
1530            body_params = params['template_custom_fields']
1531        # HTTP header `Accept`
1532        header_params['Accept'] = self.api_client.\
1533            select_header_accept(['application/json'])
1534
1535        # Authentication setting
1536        auth_settings = []
1537
1538        return self.api_client.call_api(resource_path, 'DELETE',
1539                                        path_params,
1540                                        query_params,
1541                                        header_params,
1542                                        body=body_params,
1543                                        post_params=form_params,
1544                                        files=local_var_files,
1545                                        response_type='CustomFields',
1546                                        auth_settings=auth_settings,
1547                                        callback=params.get('callback'),
1548                                        _return_http_data_only=params.get('_return_http_data_only'),
1549                                        _preload_content=params.get('_preload_content', True),
1550                                        _request_timeout=params.get('_request_timeout'),
1551                                        collection_formats=collection_formats)
1552
1553    def delete_document_fields(self, account_id, document_id, template_id, **kwargs):
1554        """
1555        Deletes custom document fields from an existing template document.
1556        Deletes custom document fields from an existing template document.
1557        This method makes a synchronous HTTP request by default. To make an
1558        asynchronous HTTP request, please define a `callback` function
1559        to be invoked when receiving the response.
1560        >>> def callback_function(response):
1561        >>>     pprint(response)
1562        >>>
1563        >>> thread = api.delete_document_fields(account_id, document_id, template_id, callback=callback_function)
1564
1565        :param callback function: The callback function
1566            for asynchronous request. (optional)
1567        :param str account_id: The external account number (int) or account ID Guid. (required)
1568        :param str document_id: The ID of the document being accessed. (required)
1569        :param str template_id: The ID of the template being accessed. (required)
1570        :param DocumentFieldsInformation document_fields_information:
1571        :return: DocumentFieldsInformation
1572                 If the method is called asynchronously,
1573                 returns the request thread.
1574        """
1575        kwargs['_return_http_data_only'] = True
1576        if kwargs.get('callback'):
1577            return self.delete_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
1578        else:
1579            (data) = self.delete_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
1580            return data
1581
1582    def delete_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
1583        """
1584        Deletes custom document fields from an existing template document.
1585        Deletes custom document fields from an existing template document.
1586        This method makes a synchronous HTTP request by default. To make an
1587        asynchronous HTTP request, please define a `callback` function
1588        to be invoked when receiving the response.
1589        >>> def callback_function(response):
1590        >>>     pprint(response)
1591        >>>
1592        >>> thread = api.delete_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
1593
1594        :param callback function: The callback function
1595            for asynchronous request. (optional)
1596        :param str account_id: The external account number (int) or account ID Guid. (required)
1597        :param str document_id: The ID of the document being accessed. (required)
1598        :param str template_id: The ID of the template being accessed. (required)
1599        :param DocumentFieldsInformation document_fields_information:
1600        :return: DocumentFieldsInformation
1601                 If the method is called asynchronously,
1602                 returns the request thread.
1603        """
1604
1605        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
1606        all_params.append('callback')
1607        all_params.append('_return_http_data_only')
1608        all_params.append('_preload_content')
1609        all_params.append('_request_timeout')
1610
1611        params = locals()
1612        for key, val in iteritems(params['kwargs']):
1613            if key not in all_params:
1614                raise TypeError(
1615                    "Got an unexpected keyword argument '%s'"
1616                    " to method delete_document_fields" % key
1617                )
1618            params[key] = val
1619        del params['kwargs']
1620        # verify the required parameter 'account_id' is set
1621        if ('account_id' not in params) or (params['account_id'] is None):
1622            raise ValueError("Missing the required parameter `account_id` when calling `delete_document_fields`")
1623        # verify the required parameter 'document_id' is set
1624        if ('document_id' not in params) or (params['document_id'] is None):
1625            raise ValueError("Missing the required parameter `document_id` when calling `delete_document_fields`")
1626        # verify the required parameter 'template_id' is set
1627        if ('template_id' not in params) or (params['template_id'] is None):
1628            raise ValueError("Missing the required parameter `template_id` when calling `delete_document_fields`")
1629
1630
1631        collection_formats = {}
1632
1633        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
1634        path_params = {}
1635        if 'account_id' in params:
1636            path_params['accountId'] = params['account_id']
1637        if 'document_id' in params:
1638            path_params['documentId'] = params['document_id']
1639        if 'template_id' in params:
1640            path_params['templateId'] = params['template_id']
1641
1642        query_params = {}
1643
1644        header_params = {}
1645
1646        form_params = []
1647        local_var_files = {}
1648
1649        body_params = None
1650        if 'document_fields_information' in params:
1651            body_params = params['document_fields_information']
1652        # HTTP header `Accept`
1653        header_params['Accept'] = self.api_client.\
1654            select_header_accept(['application/json'])
1655
1656        # Authentication setting
1657        auth_settings = []
1658
1659        return self.api_client.call_api(resource_path, 'DELETE',
1660                                        path_params,
1661                                        query_params,
1662                                        header_params,
1663                                        body=body_params,
1664                                        post_params=form_params,
1665                                        files=local_var_files,
1666                                        response_type='DocumentFieldsInformation',
1667                                        auth_settings=auth_settings,
1668                                        callback=params.get('callback'),
1669                                        _return_http_data_only=params.get('_return_http_data_only'),
1670                                        _preload_content=params.get('_preload_content', True),
1671                                        _request_timeout=params.get('_request_timeout'),
1672                                        collection_formats=collection_formats)
1673
1674    def delete_document_page(self, account_id, document_id, page_number, template_id, **kwargs):
1675        """
1676        Deletes a page from a document in an template.
1677        Deletes a page from a document in a template based on the page number.
1678        This method makes a synchronous HTTP request by default. To make an
1679        asynchronous HTTP request, please define a `callback` function
1680        to be invoked when receiving the response.
1681        >>> def callback_function(response):
1682        >>>     pprint(response)
1683        >>>
1684        >>> thread = api.delete_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
1685
1686        :param callback function: The callback function
1687            for asynchronous request. (optional)
1688        :param str account_id: The external account number (int) or account ID Guid. (required)
1689        :param str document_id: The ID of the document being accessed. (required)
1690        :param str page_number: The page number being accessed. (required)
1691        :param str template_id: The ID of the template being accessed. (required)
1692        :param PageRequest page_request:
1693        :return: None
1694                 If the method is called asynchronously,
1695                 returns the request thread.
1696        """
1697        kwargs['_return_http_data_only'] = True
1698        if kwargs.get('callback'):
1699            return self.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
1700        else:
1701            (data) = self.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
1702            return data
1703
1704    def delete_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
1705        """
1706        Deletes a page from a document in an template.
1707        Deletes a page from a document in a template based on the page number.
1708        This method makes a synchronous HTTP request by default. To make an
1709        asynchronous HTTP request, please define a `callback` function
1710        to be invoked when receiving the response.
1711        >>> def callback_function(response):
1712        >>>     pprint(response)
1713        >>>
1714        >>> thread = api.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
1715
1716        :param callback function: The callback function
1717            for asynchronous request. (optional)
1718        :param str account_id: The external account number (int) or account ID Guid. (required)
1719        :param str document_id: The ID of the document being accessed. (required)
1720        :param str page_number: The page number being accessed. (required)
1721        :param str template_id: The ID of the template being accessed. (required)
1722        :param PageRequest page_request:
1723        :return: None
1724                 If the method is called asynchronously,
1725                 returns the request thread.
1726        """
1727
1728        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request']
1729        all_params.append('callback')
1730        all_params.append('_return_http_data_only')
1731        all_params.append('_preload_content')
1732        all_params.append('_request_timeout')
1733
1734        params = locals()
1735        for key, val in iteritems(params['kwargs']):
1736            if key not in all_params:
1737                raise TypeError(
1738                    "Got an unexpected keyword argument '%s'"
1739                    " to method delete_document_page" % key
1740                )
1741            params[key] = val
1742        del params['kwargs']
1743        # verify the required parameter 'account_id' is set
1744        if ('account_id' not in params) or (params['account_id'] is None):
1745            raise ValueError("Missing the required parameter `account_id` when calling `delete_document_page`")
1746        # verify the required parameter 'document_id' is set
1747        if ('document_id' not in params) or (params['document_id'] is None):
1748            raise ValueError("Missing the required parameter `document_id` when calling `delete_document_page`")
1749        # verify the required parameter 'page_number' is set
1750        if ('page_number' not in params) or (params['page_number'] is None):
1751            raise ValueError("Missing the required parameter `page_number` when calling `delete_document_page`")
1752        # verify the required parameter 'template_id' is set
1753        if ('template_id' not in params) or (params['template_id'] is None):
1754            raise ValueError("Missing the required parameter `template_id` when calling `delete_document_page`")
1755
1756
1757        collection_formats = {}
1758
1759        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}'.replace('{format}', 'json')
1760        path_params = {}
1761        if 'account_id' in params:
1762            path_params['accountId'] = params['account_id']
1763        if 'document_id' in params:
1764            path_params['documentId'] = params['document_id']
1765        if 'page_number' in params:
1766            path_params['pageNumber'] = params['page_number']
1767        if 'template_id' in params:
1768            path_params['templateId'] = params['template_id']
1769
1770        query_params = {}
1771
1772        header_params = {}
1773
1774        form_params = []
1775        local_var_files = {}
1776
1777        body_params = None
1778        if 'page_request' in params:
1779            body_params = params['page_request']
1780        # HTTP header `Accept`
1781        header_params['Accept'] = self.api_client.\
1782            select_header_accept(['application/json'])
1783
1784        # Authentication setting
1785        auth_settings = []
1786
1787        return self.api_client.call_api(resource_path, 'DELETE',
1788                                        path_params,
1789                                        query_params,
1790                                        header_params,
1791                                        body=body_params,
1792                                        post_params=form_params,
1793                                        files=local_var_files,
1794                                        response_type=None,
1795                                        auth_settings=auth_settings,
1796                                        callback=params.get('callback'),
1797                                        _return_http_data_only=params.get('_return_http_data_only'),
1798                                        _preload_content=params.get('_preload_content', True),
1799                                        _request_timeout=params.get('_request_timeout'),
1800                                        collection_formats=collection_formats)
1801
1802    def delete_documents(self, account_id, template_id, **kwargs):
1803        """
1804        Deletes documents from a template.
1805        Deletes one or more documents from an existing template.
1806        This method makes a synchronous HTTP request by default. To make an
1807        asynchronous HTTP request, please define a `callback` function
1808        to be invoked when receiving the response.
1809        >>> def callback_function(response):
1810        >>>     pprint(response)
1811        >>>
1812        >>> thread = api.delete_documents(account_id, template_id, callback=callback_function)
1813
1814        :param callback function: The callback function
1815            for asynchronous request. (optional)
1816        :param str account_id: The external account number (int) or account ID Guid. (required)
1817        :param str template_id: The ID of the template being accessed. (required)
1818        :param EnvelopeDefinition envelope_definition:
1819        :return: TemplateDocumentsResult
1820                 If the method is called asynchronously,
1821                 returns the request thread.
1822        """
1823        kwargs['_return_http_data_only'] = True
1824        if kwargs.get('callback'):
1825            return self.delete_documents_with_http_info(account_id, template_id, **kwargs)
1826        else:
1827            (data) = self.delete_documents_with_http_info(account_id, template_id, **kwargs)
1828            return data
1829
1830    def delete_documents_with_http_info(self, account_id, template_id, **kwargs):
1831        """
1832        Deletes documents from a template.
1833        Deletes one or more documents from an existing template.
1834        This method makes a synchronous HTTP request by default. To make an
1835        asynchronous HTTP request, please define a `callback` function
1836        to be invoked when receiving the response.
1837        >>> def callback_function(response):
1838        >>>     pprint(response)
1839        >>>
1840        >>> thread = api.delete_documents_with_http_info(account_id, template_id, callback=callback_function)
1841
1842        :param callback function: The callback function
1843            for asynchronous request. (optional)
1844        :param str account_id: The external account number (int) or account ID Guid. (required)
1845        :param str template_id: The ID of the template being accessed. (required)
1846        :param EnvelopeDefinition envelope_definition:
1847        :return: TemplateDocumentsResult
1848                 If the method is called asynchronously,
1849                 returns the request thread.
1850        """
1851
1852        all_params = ['account_id', 'template_id', 'envelope_definition']
1853        all_params.append('callback')
1854        all_params.append('_return_http_data_only')
1855        all_params.append('_preload_content')
1856        all_params.append('_request_timeout')
1857
1858        params = locals()
1859        for key, val in iteritems(params['kwargs']):
1860            if key not in all_params:
1861                raise TypeError(
1862                    "Got an unexpected keyword argument '%s'"
1863                    " to method delete_documents" % key
1864                )
1865            params[key] = val
1866        del params['kwargs']
1867        # verify the required parameter 'account_id' is set
1868        if ('account_id' not in params) or (params['account_id'] is None):
1869            raise ValueError("Missing the required parameter `account_id` when calling `delete_documents`")
1870        # verify the required parameter 'template_id' is set
1871        if ('template_id' not in params) or (params['template_id'] is None):
1872            raise ValueError("Missing the required parameter `template_id` when calling `delete_documents`")
1873
1874
1875        collection_formats = {}
1876
1877        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
1878        path_params = {}
1879        if 'account_id' in params:
1880            path_params['accountId'] = params['account_id']
1881        if 'template_id' in params:
1882            path_params['templateId'] = params['template_id']
1883
1884        query_params = {}
1885
1886        header_params = {}
1887
1888        form_params = []
1889        local_var_files = {}
1890
1891        body_params = None
1892        if 'envelope_definition' in params:
1893            body_params = params['envelope_definition']
1894        # HTTP header `Accept`
1895        header_params['Accept'] = self.api_client.\
1896            select_header_accept(['application/json'])
1897
1898        # Authentication setting
1899        auth_settings = []
1900
1901        return self.api_client.call_api(resource_path, 'DELETE',
1902                                        path_params,
1903                                        query_params,
1904                                        header_params,
1905                                        body=body_params,
1906                                        post_params=form_params,
1907                                        files=local_var_files,
1908                                        response_type='TemplateDocumentsResult',
1909                                        auth_settings=auth_settings,
1910                                        callback=params.get('callback'),
1911                                        _return_http_data_only=params.get('_return_http_data_only'),
1912                                        _preload_content=params.get('_preload_content', True),
1913                                        _request_timeout=params.get('_request_timeout'),
1914                                        collection_formats=collection_formats)
1915
1916    def delete_group_share(self, account_id, template_id, template_part, **kwargs):
1917        """
1918        Removes a member group's sharing permissions for a template.
1919        Removes a member group's sharing permissions for a specified template.
1920        This method makes a synchronous HTTP request by default. To make an
1921        asynchronous HTTP request, please define a `callback` function
1922        to be invoked when receiving the response.
1923        >>> def callback_function(response):
1924        >>>     pprint(response)
1925        >>>
1926        >>> thread = api.delete_group_share(account_id, template_id, template_part, callback=callback_function)
1927
1928        :param callback function: The callback function
1929            for asynchronous request. (optional)
1930        :param str account_id: The external account number (int) or account ID Guid. (required)
1931        :param str template_id: The ID of the template being accessed. (required)
1932        :param str template_part: Currently, the only defined part is **groups**. (required)
1933        :param GroupInformation group_information:
1934        :return: GroupInformation
1935                 If the method is called asynchronously,
1936                 returns the request thread.
1937        """
1938        kwargs['_return_http_data_only'] = True
1939        if kwargs.get('callback'):
1940            return self.delete_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
1941        else:
1942            (data) = self.delete_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
1943            return data
1944
1945    def delete_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs):
1946        """
1947        Removes a member group's sharing permissions for a template.
1948        Removes a member group's sharing permissions for a specified template.
1949        This method makes a synchronous HTTP request by default. To make an
1950        asynchronous HTTP request, please define a `callback` function
1951        to be invoked when receiving the response.
1952        >>> def callback_function(response):
1953        >>>     pprint(response)
1954        >>>
1955        >>> thread = api.delete_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
1956
1957        :param callback function: The callback function
1958            for asynchronous request. (optional)
1959        :param str account_id: The external account number (int) or account ID Guid. (required)
1960        :param str template_id: The ID of the template being accessed. (required)
1961        :param str template_part: Currently, the only defined part is **groups**. (required)
1962        :param GroupInformation group_information:
1963        :return: GroupInformation
1964                 If the method is called asynchronously,
1965                 returns the request thread.
1966        """
1967
1968        all_params = ['account_id', 'template_id', 'template_part', 'group_information']
1969        all_params.append('callback')
1970        all_params.append('_return_http_data_only')
1971        all_params.append('_preload_content')
1972        all_params.append('_request_timeout')
1973
1974        params = locals()
1975        for key, val in iteritems(params['kwargs']):
1976            if key not in all_params:
1977                raise TypeError(
1978                    "Got an unexpected keyword argument '%s'"
1979                    " to method delete_group_share" % key
1980                )
1981            params[key] = val
1982        del params['kwargs']
1983        # verify the required parameter 'account_id' is set
1984        if ('account_id' not in params) or (params['account_id'] is None):
1985            raise ValueError("Missing the required parameter `account_id` when calling `delete_group_share`")
1986        # verify the required parameter 'template_id' is set
1987        if ('template_id' not in params) or (params['template_id'] is None):
1988            raise ValueError("Missing the required parameter `template_id` when calling `delete_group_share`")
1989        # verify the required parameter 'template_part' is set
1990        if ('template_part' not in params) or (params['template_part'] is None):
1991            raise ValueError("Missing the required parameter `template_part` when calling `delete_group_share`")
1992
1993
1994        collection_formats = {}
1995
1996        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json')
1997        path_params = {}
1998        if 'account_id' in params:
1999            path_params['accountId'] = params['account_id']
2000        if 'template_id' in params:
2001            path_params['templateId'] = params['template_id']
2002        if 'template_part' in params:
2003            path_params['templatePart'] = params['template_part']
2004
2005        query_params = {}
2006
2007        header_params = {}
2008
2009        form_params = []
2010        local_var_files = {}
2011
2012        body_params = None
2013        if 'group_information' in params:
2014            body_params = params['group_information']
2015        # HTTP header `Accept`
2016        header_params['Accept'] = self.api_client.\
2017            select_header_accept(['application/json'])
2018
2019        # Authentication setting
2020        auth_settings = []
2021
2022        return self.api_client.call_api(resource_path, 'DELETE',
2023                                        path_params,
2024                                        query_params,
2025                                        header_params,
2026                                        body=body_params,
2027                                        post_params=form_params,
2028                                        files=local_var_files,
2029                                        response_type='GroupInformation',
2030                                        auth_settings=auth_settings,
2031                                        callback=params.get('callback'),
2032                                        _return_http_data_only=params.get('_return_http_data_only'),
2033                                        _preload_content=params.get('_preload_content', True),
2034                                        _request_timeout=params.get('_request_timeout'),
2035                                        collection_formats=collection_formats)
2036
2037    def delete_lock(self, account_id, template_id, **kwargs):
2038        """
2039        Deletes a template lock.
2040        Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request.
2041        This method makes a synchronous HTTP request by default. To make an
2042        asynchronous HTTP request, please define a `callback` function
2043        to be invoked when receiving the response.
2044        >>> def callback_function(response):
2045        >>>     pprint(response)
2046        >>>
2047        >>> thread = api.delete_lock(account_id, template_id, callback=callback_function)
2048
2049        :param callback function: The callback function
2050            for asynchronous request. (optional)
2051        :param str account_id: The external account number (int) or account ID Guid. (required)
2052        :param str template_id: The ID of the template being accessed. (required)
2053        :param LockRequest lock_request:
2054        :return: LockInformation
2055                 If the method is called asynchronously,
2056                 returns the request thread.
2057        """
2058        kwargs['_return_http_data_only'] = True
2059        if kwargs.get('callback'):
2060            return self.delete_lock_with_http_info(account_id, template_id, **kwargs)
2061        else:
2062            (data) = self.delete_lock_with_http_info(account_id, template_id, **kwargs)
2063            return data
2064
2065    def delete_lock_with_http_info(self, account_id, template_id, **kwargs):
2066        """
2067        Deletes a template lock.
2068        Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request.
2069        This method makes a synchronous HTTP request by default. To make an
2070        asynchronous HTTP request, please define a `callback` function
2071        to be invoked when receiving the response.
2072        >>> def callback_function(response):
2073        >>>     pprint(response)
2074        >>>
2075        >>> thread = api.delete_lock_with_http_info(account_id, template_id, callback=callback_function)
2076
2077        :param callback function: The callback function
2078            for asynchronous request. (optional)
2079        :param str account_id: The external account number (int) or account ID Guid. (required)
2080        :param str template_id: The ID of the template being accessed. (required)
2081        :param LockRequest lock_request:
2082        :return: LockInformation
2083                 If the method is called asynchronously,
2084                 returns the request thread.
2085        """
2086
2087        all_params = ['account_id', 'template_id', 'lock_request']
2088        all_params.append('callback')
2089        all_params.append('_return_http_data_only')
2090        all_params.append('_preload_content')
2091        all_params.append('_request_timeout')
2092
2093        params = locals()
2094        for key, val in iteritems(params['kwargs']):
2095            if key not in all_params:
2096                raise TypeError(
2097                    "Got an unexpected keyword argument '%s'"
2098                    " to method delete_lock" % key
2099                )
2100            params[key] = val
2101        del params['kwargs']
2102        # verify the required parameter 'account_id' is set
2103        if ('account_id' not in params) or (params['account_id'] is None):
2104            raise ValueError("Missing the required parameter `account_id` when calling `delete_lock`")
2105        # verify the required parameter 'template_id' is set
2106        if ('template_id' not in params) or (params['template_id'] is None):
2107            raise ValueError("Missing the required parameter `template_id` when calling `delete_lock`")
2108
2109
2110        collection_formats = {}
2111
2112        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
2113        path_params = {}
2114        if 'account_id' in params:
2115            path_params['accountId'] = params['account_id']
2116        if 'template_id' in params:
2117            path_params['templateId'] = params['template_id']
2118
2119        query_params = {}
2120
2121        header_params = {}
2122
2123        form_params = []
2124        local_var_files = {}
2125
2126        body_params = None
2127        if 'lock_request' in params:
2128            body_params = params['lock_request']
2129        # HTTP header `Accept`
2130        header_params['Accept'] = self.api_client.\
2131            select_header_accept(['application/json'])
2132
2133        # Authentication setting
2134        auth_settings = []
2135
2136        return self.api_client.call_api(resource_path, 'DELETE',
2137                                        path_params,
2138                                        query_params,
2139                                        header_params,
2140                                        body=body_params,
2141                                        post_params=form_params,
2142                                        files=local_var_files,
2143                                        response_type='LockInformation',
2144                                        auth_settings=auth_settings,
2145                                        callback=params.get('callback'),
2146                                        _return_http_data_only=params.get('_return_http_data_only'),
2147                                        _preload_content=params.get('_preload_content', True),
2148                                        _request_timeout=params.get('_request_timeout'),
2149                                        collection_formats=collection_formats)
2150
2151    def delete_recipient(self, account_id, recipient_id, template_id, **kwargs):
2152        """
2153        Deletes the specified recipient file from a template.
2154        Deletes the specified recipient file from the specified template.
2155        This method makes a synchronous HTTP request by default. To make an
2156        asynchronous HTTP request, please define a `callback` function
2157        to be invoked when receiving the response.
2158        >>> def callback_function(response):
2159        >>>     pprint(response)
2160        >>>
2161        >>> thread = api.delete_recipient(account_id, recipient_id, template_id, callback=callback_function)
2162
2163        :param callback function: The callback function
2164            for asynchronous request. (optional)
2165        :param str account_id: The external account number (int) or account ID Guid. (required)
2166        :param str recipient_id: The ID of the recipient being accessed. (required)
2167        :param str template_id: The ID of the template being accessed. (required)
2168        :param TemplateRecipients template_recipients:
2169        :return: Recipients
2170                 If the method is called asynchronously,
2171                 returns the request thread.
2172        """
2173        kwargs['_return_http_data_only'] = True
2174        if kwargs.get('callback'):
2175            return self.delete_recipient_with_http_info(account_id, recipient_id, template_id, **kwargs)
2176        else:
2177            (data) = self.delete_recipient_with_http_info(account_id, recipient_id, template_id, **kwargs)
2178            return data
2179
2180    def delete_recipient_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
2181        """
2182        Deletes the specified recipient file from a template.
2183        Deletes the specified recipient file from the specified template.
2184        This method makes a synchronous HTTP request by default. To make an
2185        asynchronous HTTP request, please define a `callback` function
2186        to be invoked when receiving the response.
2187        >>> def callback_function(response):
2188        >>>     pprint(response)
2189        >>>
2190        >>> thread = api.delete_recipient_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
2191
2192        :param callback function: The callback function
2193            for asynchronous request. (optional)
2194        :param str account_id: The external account number (int) or account ID Guid. (required)
2195        :param str recipient_id: The ID of the recipient being accessed. (required)
2196        :param str template_id: The ID of the template being accessed. (required)
2197        :param TemplateRecipients template_recipients:
2198        :return: Recipients
2199                 If the method is called asynchronously,
2200                 returns the request thread.
2201        """
2202
2203        all_params = ['account_id', 'recipient_id', 'template_id', 'template_recipients']
2204        all_params.append('callback')
2205        all_params.append('_return_http_data_only')
2206        all_params.append('_preload_content')
2207        all_params.append('_request_timeout')
2208
2209        params = locals()
2210        for key, val in iteritems(params['kwargs']):
2211            if key not in all_params:
2212                raise TypeError(
2213                    "Got an unexpected keyword argument '%s'"
2214                    " to method delete_recipient" % key
2215                )
2216            params[key] = val
2217        del params['kwargs']
2218        # verify the required parameter 'account_id' is set
2219        if ('account_id' not in params) or (params['account_id'] is None):
2220            raise ValueError("Missing the required parameter `account_id` when calling `delete_recipient`")
2221        # verify the required parameter 'recipient_id' is set
2222        if ('recipient_id' not in params) or (params['recipient_id'] is None):
2223            raise ValueError("Missing the required parameter `recipient_id` when calling `delete_recipient`")
2224        # verify the required parameter 'template_id' is set
2225        if ('template_id' not in params) or (params['template_id'] is None):
2226            raise ValueError("Missing the required parameter `template_id` when calling `delete_recipient`")
2227
2228
2229        collection_formats = {}
2230
2231        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}'.replace('{format}', 'json')
2232        path_params = {}
2233        if 'account_id' in params:
2234            path_params['accountId'] = params['account_id']
2235        if 'recipient_id' in params:
2236            path_params['recipientId'] = params['recipient_id']
2237        if 'template_id' in params:
2238            path_params['templateId'] = params['template_id']
2239
2240        query_params = {}
2241
2242        header_params = {}
2243
2244        form_params = []
2245        local_var_files = {}
2246
2247        body_params = None
2248        if 'template_recipients' in params:
2249            body_params = params['template_recipients']
2250        # HTTP header `Accept`
2251        header_params['Accept'] = self.api_client.\
2252            select_header_accept(['application/json'])
2253
2254        # Authentication setting
2255        auth_settings = []
2256
2257        return self.api_client.call_api(resource_path, 'DELETE',
2258                                        path_params,
2259                                        query_params,
2260                                        header_params,
2261                                        body=body_params,
2262                                        post_params=form_params,
2263                                        files=local_var_files,
2264                                        response_type='Recipients',
2265                                        auth_settings=auth_settings,
2266                                        callback=params.get('callback'),
2267                                        _return_http_data_only=params.get('_return_http_data_only'),
2268                                        _preload_content=params.get('_preload_content', True),
2269                                        _request_timeout=params.get('_request_timeout'),
2270                                        collection_formats=collection_formats)
2271
2272    def delete_recipients(self, account_id, template_id, **kwargs):
2273        """
2274        Deletes recipients from a template.
2275        Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients.
2276        This method makes a synchronous HTTP request by default. To make an
2277        asynchronous HTTP request, please define a `callback` function
2278        to be invoked when receiving the response.
2279        >>> def callback_function(response):
2280        >>>     pprint(response)
2281        >>>
2282        >>> thread = api.delete_recipients(account_id, template_id, callback=callback_function)
2283
2284        :param callback function: The callback function
2285            for asynchronous request. (optional)
2286        :param str account_id: The external account number (int) or account ID Guid. (required)
2287        :param str template_id: The ID of the template being accessed. (required)
2288        :param TemplateRecipients template_recipients:
2289        :return: Recipients
2290                 If the method is called asynchronously,
2291                 returns the request thread.
2292        """
2293        kwargs['_return_http_data_only'] = True
2294        if kwargs.get('callback'):
2295            return self.delete_recipients_with_http_info(account_id, template_id, **kwargs)
2296        else:
2297            (data) = self.delete_recipients_with_http_info(account_id, template_id, **kwargs)
2298            return data
2299
2300    def delete_recipients_with_http_info(self, account_id, template_id, **kwargs):
2301        """
2302        Deletes recipients from a template.
2303        Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients.
2304        This method makes a synchronous HTTP request by default. To make an
2305        asynchronous HTTP request, please define a `callback` function
2306        to be invoked when receiving the response.
2307        >>> def callback_function(response):
2308        >>>     pprint(response)
2309        >>>
2310        >>> thread = api.delete_recipients_with_http_info(account_id, template_id, callback=callback_function)
2311
2312        :param callback function: The callback function
2313            for asynchronous request. (optional)
2314        :param str account_id: The external account number (int) or account ID Guid. (required)
2315        :param str template_id: The ID of the template being accessed. (required)
2316        :param TemplateRecipients template_recipients:
2317        :return: Recipients
2318                 If the method is called asynchronously,
2319                 returns the request thread.
2320        """
2321
2322        all_params = ['account_id', 'template_id', 'template_recipients']
2323        all_params.append('callback')
2324        all_params.append('_return_http_data_only')
2325        all_params.append('_preload_content')
2326        all_params.append('_request_timeout')
2327
2328        params = locals()
2329        for key, val in iteritems(params['kwargs']):
2330            if key not in all_params:
2331                raise TypeError(
2332                    "Got an unexpected keyword argument '%s'"
2333                    " to method delete_recipients" % key
2334                )
2335            params[key] = val
2336        del params['kwargs']
2337        # verify the required parameter 'account_id' is set
2338        if ('account_id' not in params) or (params['account_id'] is None):
2339            raise ValueError("Missing the required parameter `account_id` when calling `delete_recipients`")
2340        # verify the required parameter 'template_id' is set
2341        if ('template_id' not in params) or (params['template_id'] is None):
2342            raise ValueError("Missing the required parameter `template_id` when calling `delete_recipients`")
2343
2344
2345        collection_formats = {}
2346
2347        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
2348        path_params = {}
2349        if 'account_id' in params:
2350            path_params['accountId'] = params['account_id']
2351        if 'template_id' in params:
2352            path_params['templateId'] = params['template_id']
2353
2354        query_params = {}
2355
2356        header_params = {}
2357
2358        form_params = []
2359        local_var_files = {}
2360
2361        body_params = None
2362        if 'template_recipients' in params:
2363            body_params = params['template_recipients']
2364        # HTTP header `Accept`
2365        header_params['Accept'] = self.api_client.\
2366            select_header_accept(['application/json'])
2367
2368        # Authentication setting
2369        auth_settings = []
2370
2371        return self.api_client.call_api(resource_path, 'DELETE',
2372                                        path_params,
2373                                        query_params,
2374                                        header_params,
2375                                        body=body_params,
2376                                        post_params=form_params,
2377                                        files=local_var_files,
2378                                        response_type='Recipients',
2379                                        auth_settings=auth_settings,
2380                                        callback=params.get('callback'),
2381                                        _return_http_data_only=params.get('_return_http_data_only'),
2382                                        _preload_content=params.get('_preload_content', True),
2383                                        _request_timeout=params.get('_request_timeout'),
2384                                        collection_formats=collection_formats)
2385
2386    def delete_tabs(self, account_id, recipient_id, template_id, **kwargs):
2387        """
2388        Deletes the tabs associated with a recipient in a template.
2389        Deletes one or more tabs associated with a recipient in a template.
2390        This method makes a synchronous HTTP request by default. To make an
2391        asynchronous HTTP request, please define a `callback` function
2392        to be invoked when receiving the response.
2393        >>> def callback_function(response):
2394        >>>     pprint(response)
2395        >>>
2396        >>> thread = api.delete_tabs(account_id, recipient_id, template_id, callback=callback_function)
2397
2398        :param callback function: The callback function
2399            for asynchronous request. (optional)
2400        :param str account_id: The external account number (int) or account ID Guid. (required)
2401        :param str recipient_id: The ID of the recipient being accessed. (required)
2402        :param str template_id: The ID of the template being accessed. (required)
2403        :param TemplateTabs template_tabs:
2404        :return: Tabs
2405                 If the method is called asynchronously,
2406                 returns the request thread.
2407        """
2408        kwargs['_return_http_data_only'] = True
2409        if kwargs.get('callback'):
2410            return self.delete_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
2411        else:
2412            (data) = self.delete_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
2413            return data
2414
2415    def delete_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
2416        """
2417        Deletes the tabs associated with a recipient in a template.
2418        Deletes one or more tabs associated with a recipient in a template.
2419        This method makes a synchronous HTTP request by default. To make an
2420        asynchronous HTTP request, please define a `callback` function
2421        to be invoked when receiving the response.
2422        >>> def callback_function(response):
2423        >>>     pprint(response)
2424        >>>
2425        >>> thread = api.delete_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
2426
2427        :param callback function: The callback function
2428            for asynchronous request. (optional)
2429        :param str account_id: The external account number (int) or account ID Guid. (required)
2430        :param str recipient_id: The ID of the recipient being accessed. (required)
2431        :param str template_id: The ID of the template being accessed. (required)
2432        :param TemplateTabs template_tabs:
2433        :return: Tabs
2434                 If the method is called asynchronously,
2435                 returns the request thread.
2436        """
2437
2438        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
2439        all_params.append('callback')
2440        all_params.append('_return_http_data_only')
2441        all_params.append('_preload_content')
2442        all_params.append('_request_timeout')
2443
2444        params = locals()
2445        for key, val in iteritems(params['kwargs']):
2446            if key not in all_params:
2447                raise TypeError(
2448                    "Got an unexpected keyword argument '%s'"
2449                    " to method delete_tabs" % key
2450                )
2451            params[key] = val
2452        del params['kwargs']
2453        # verify the required parameter 'account_id' is set
2454        if ('account_id' not in params) or (params['account_id'] is None):
2455            raise ValueError("Missing the required parameter `account_id` when calling `delete_tabs`")
2456        # verify the required parameter 'recipient_id' is set
2457        if ('recipient_id' not in params) or (params['recipient_id'] is None):
2458            raise ValueError("Missing the required parameter `recipient_id` when calling `delete_tabs`")
2459        # verify the required parameter 'template_id' is set
2460        if ('template_id' not in params) or (params['template_id'] is None):
2461            raise ValueError("Missing the required parameter `template_id` when calling `delete_tabs`")
2462
2463
2464        collection_formats = {}
2465
2466        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
2467        path_params = {}
2468        if 'account_id' in params:
2469            path_params['accountId'] = params['account_id']
2470        if 'recipient_id' in params:
2471            path_params['recipientId'] = params['recipient_id']
2472        if 'template_id' in params:
2473            path_params['templateId'] = params['template_id']
2474
2475        query_params = {}
2476
2477        header_params = {}
2478
2479        form_params = []
2480        local_var_files = {}
2481
2482        body_params = None
2483        if 'template_tabs' in params:
2484            body_params = params['template_tabs']
2485        # HTTP header `Accept`
2486        header_params['Accept'] = self.api_client.\
2487            select_header_accept(['application/json'])
2488
2489        # Authentication setting
2490        auth_settings = []
2491
2492        return self.api_client.call_api(resource_path, 'DELETE',
2493                                        path_params,
2494                                        query_params,
2495                                        header_params,
2496                                        body=body_params,
2497                                        post_params=form_params,
2498                                        files=local_var_files,
2499                                        response_type='Tabs',
2500                                        auth_settings=auth_settings,
2501                                        callback=params.get('callback'),
2502                                        _return_http_data_only=params.get('_return_http_data_only'),
2503                                        _preload_content=params.get('_preload_content', True),
2504                                        _request_timeout=params.get('_request_timeout'),
2505                                        collection_formats=collection_formats)
2506
2507    def delete_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
2508        """
2509        Deletes tabs from an envelope document
2510        Deletes tabs from the document specified by `documentId` in the template specified by `templateId`. 
2511        This method makes a synchronous HTTP request by default. To make an
2512        asynchronous HTTP request, please define a `callback` function
2513        to be invoked when receiving the response.
2514        >>> def callback_function(response):
2515        >>>     pprint(response)
2516        >>>
2517        >>> thread = api.delete_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
2518
2519        :param callback function: The callback function
2520            for asynchronous request. (optional)
2521        :param str account_id: The external account number (int) or account ID Guid. (required)
2522        :param str document_id: The ID of the document being accessed. (required)
2523        :param str template_id: The ID of the template being accessed. (required)
2524        :param TemplateTabs template_tabs:
2525        :return: Tabs
2526                 If the method is called asynchronously,
2527                 returns the request thread.
2528        """
2529        kwargs['_return_http_data_only'] = True
2530        if kwargs.get('callback'):
2531            return self.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2532        else:
2533            (data) = self.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2534            return data
2535
2536    def delete_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
2537        """
2538        Deletes tabs from an envelope document
2539        Deletes tabs from the document specified by `documentId` in the template specified by `templateId`. 
2540        This method makes a synchronous HTTP request by default. To make an
2541        asynchronous HTTP request, please define a `callback` function
2542        to be invoked when receiving the response.
2543        >>> def callback_function(response):
2544        >>>     pprint(response)
2545        >>>
2546        >>> thread = api.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
2547
2548        :param callback function: The callback function
2549            for asynchronous request. (optional)
2550        :param str account_id: The external account number (int) or account ID Guid. (required)
2551        :param str document_id: The ID of the document being accessed. (required)
2552        :param str template_id: The ID of the template being accessed. (required)
2553        :param TemplateTabs template_tabs:
2554        :return: Tabs
2555                 If the method is called asynchronously,
2556                 returns the request thread.
2557        """
2558
2559        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
2560        all_params.append('callback')
2561        all_params.append('_return_http_data_only')
2562        all_params.append('_preload_content')
2563        all_params.append('_request_timeout')
2564
2565        params = locals()
2566        for key, val in iteritems(params['kwargs']):
2567            if key not in all_params:
2568                raise TypeError(
2569                    "Got an unexpected keyword argument '%s'"
2570                    " to method delete_template_document_tabs" % key
2571                )
2572            params[key] = val
2573        del params['kwargs']
2574        # verify the required parameter 'account_id' is set
2575        if ('account_id' not in params) or (params['account_id'] is None):
2576            raise ValueError("Missing the required parameter `account_id` when calling `delete_template_document_tabs`")
2577        # verify the required parameter 'document_id' is set
2578        if ('document_id' not in params) or (params['document_id'] is None):
2579            raise ValueError("Missing the required parameter `document_id` when calling `delete_template_document_tabs`")
2580        # verify the required parameter 'template_id' is set
2581        if ('template_id' not in params) or (params['template_id'] is None):
2582            raise ValueError("Missing the required parameter `template_id` when calling `delete_template_document_tabs`")
2583
2584
2585        collection_formats = {}
2586
2587        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
2588        path_params = {}
2589        if 'account_id' in params:
2590            path_params['accountId'] = params['account_id']
2591        if 'document_id' in params:
2592            path_params['documentId'] = params['document_id']
2593        if 'template_id' in params:
2594            path_params['templateId'] = params['template_id']
2595
2596        query_params = {}
2597
2598        header_params = {}
2599
2600        form_params = []
2601        local_var_files = {}
2602
2603        body_params = None
2604        if 'template_tabs' in params:
2605            body_params = params['template_tabs']
2606        # HTTP header `Accept`
2607        header_params['Accept'] = self.api_client.\
2608            select_header_accept(['application/json'])
2609
2610        # Authentication setting
2611        auth_settings = []
2612
2613        return self.api_client.call_api(resource_path, 'DELETE',
2614                                        path_params,
2615                                        query_params,
2616                                        header_params,
2617                                        body=body_params,
2618                                        post_params=form_params,
2619                                        files=local_var_files,
2620                                        response_type='Tabs',
2621                                        auth_settings=auth_settings,
2622                                        callback=params.get('callback'),
2623                                        _return_http_data_only=params.get('_return_http_data_only'),
2624                                        _preload_content=params.get('_preload_content', True),
2625                                        _request_timeout=params.get('_request_timeout'),
2626                                        collection_formats=collection_formats)
2627
2628    def get(self, account_id, template_id, **kwargs):
2629        """
2630        Gets a list of templates for a specified account.
2631        Retrieves the definition of the specified template.
2632        This method makes a synchronous HTTP request by default. To make an
2633        asynchronous HTTP request, please define a `callback` function
2634        to be invoked when receiving the response.
2635        >>> def callback_function(response):
2636        >>>     pprint(response)
2637        >>>
2638        >>> thread = api.get(account_id, template_id, callback=callback_function)
2639
2640        :param callback function: The callback function
2641            for asynchronous request. (optional)
2642        :param str account_id: The external account number (int) or account ID Guid. (required)
2643        :param str template_id: The ID of the template being accessed. (required)
2644        :param str include:
2645        :return: EnvelopeTemplate
2646                 If the method is called asynchronously,
2647                 returns the request thread.
2648        """
2649        kwargs['_return_http_data_only'] = True
2650        if kwargs.get('callback'):
2651            return self.get_with_http_info(account_id, template_id, **kwargs)
2652        else:
2653            (data) = self.get_with_http_info(account_id, template_id, **kwargs)
2654            return data
2655
2656    def get_with_http_info(self, account_id, template_id, **kwargs):
2657        """
2658        Gets a list of templates for a specified account.
2659        Retrieves the definition of the specified template.
2660        This method makes a synchronous HTTP request by default. To make an
2661        asynchronous HTTP request, please define a `callback` function
2662        to be invoked when receiving the response.
2663        >>> def callback_function(response):
2664        >>>     pprint(response)
2665        >>>
2666        >>> thread = api.get_with_http_info(account_id, template_id, callback=callback_function)
2667
2668        :param callback function: The callback function
2669            for asynchronous request. (optional)
2670        :param str account_id: The external account number (int) or account ID Guid. (required)
2671        :param str template_id: The ID of the template being accessed. (required)
2672        :param str include:
2673        :return: EnvelopeTemplate
2674                 If the method is called asynchronously,
2675                 returns the request thread.
2676        """
2677
2678        all_params = ['account_id', 'template_id', 'include']
2679        all_params.append('callback')
2680        all_params.append('_return_http_data_only')
2681        all_params.append('_preload_content')
2682        all_params.append('_request_timeout')
2683
2684        params = locals()
2685        for key, val in iteritems(params['kwargs']):
2686            if key not in all_params:
2687                raise TypeError(
2688                    "Got an unexpected keyword argument '%s'"
2689                    " to method get" % key
2690                )
2691            params[key] = val
2692        del params['kwargs']
2693        # verify the required parameter 'account_id' is set
2694        if ('account_id' not in params) or (params['account_id'] is None):
2695            raise ValueError("Missing the required parameter `account_id` when calling `get`")
2696        # verify the required parameter 'template_id' is set
2697        if ('template_id' not in params) or (params['template_id'] is None):
2698            raise ValueError("Missing the required parameter `template_id` when calling `get`")
2699
2700
2701        collection_formats = {}
2702
2703        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json')
2704        path_params = {}
2705        if 'account_id' in params:
2706            path_params['accountId'] = params['account_id']
2707        if 'template_id' in params:
2708            path_params['templateId'] = params['template_id']
2709
2710        query_params = {}
2711        if 'include' in params:
2712            query_params['include'] = params['include']
2713
2714        header_params = {}
2715
2716        form_params = []
2717        local_var_files = {}
2718
2719        body_params = None
2720        # HTTP header `Accept`
2721        header_params['Accept'] = self.api_client.\
2722            select_header_accept(['application/json'])
2723
2724        # Authentication setting
2725        auth_settings = []
2726
2727        return self.api_client.call_api(resource_path, 'GET',
2728                                        path_params,
2729                                        query_params,
2730                                        header_params,
2731                                        body=body_params,
2732                                        post_params=form_params,
2733                                        files=local_var_files,
2734                                        response_type='EnvelopeTemplate',
2735                                        auth_settings=auth_settings,
2736                                        callback=params.get('callback'),
2737                                        _return_http_data_only=params.get('_return_http_data_only'),
2738                                        _preload_content=params.get('_preload_content', True),
2739                                        _request_timeout=params.get('_request_timeout'),
2740                                        collection_formats=collection_formats)
2741
2742    def get_document(self, account_id, document_id, template_id, **kwargs):
2743        """
2744        Gets PDF documents from a template.
2745        Retrieves one or more PDF documents from the specified template.  You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf.
2746        This method makes a synchronous HTTP request by default. To make an
2747        asynchronous HTTP request, please define a `callback` function
2748        to be invoked when receiving the response.
2749        >>> def callback_function(response):
2750        >>>     pprint(response)
2751        >>>
2752        >>> thread = api.get_document(account_id, document_id, template_id, callback=callback_function)
2753
2754        :param callback function: The callback function
2755            for asynchronous request. (optional)
2756        :param str account_id: The external account number (int) or account ID Guid. (required)
2757        :param str document_id: The ID of the document being accessed. (required)
2758        :param str template_id: The ID of the template being accessed. (required)
2759        :param str encrypt:
2760        :param str show_changes:
2761        :return: file
2762                 If the method is called asynchronously,
2763                 returns the request thread.
2764        """
2765        kwargs['_return_http_data_only'] = True
2766        if kwargs.get('callback'):
2767            return self.get_document_with_http_info(account_id, document_id, template_id, **kwargs)
2768        else:
2769            (data) = self.get_document_with_http_info(account_id, document_id, template_id, **kwargs)
2770            return data
2771
2772    def get_document_with_http_info(self, account_id, document_id, template_id, **kwargs):
2773        """
2774        Gets PDF documents from a template.
2775        Retrieves one or more PDF documents from the specified template.  You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf.
2776        This method makes a synchronous HTTP request by default. To make an
2777        asynchronous HTTP request, please define a `callback` function
2778        to be invoked when receiving the response.
2779        >>> def callback_function(response):
2780        >>>     pprint(response)
2781        >>>
2782        >>> thread = api.get_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
2783
2784        :param callback function: The callback function
2785            for asynchronous request. (optional)
2786        :param str account_id: The external account number (int) or account ID Guid. (required)
2787        :param str document_id: The ID of the document being accessed. (required)
2788        :param str template_id: The ID of the template being accessed. (required)
2789        :param str encrypt:
2790        :param str show_changes:
2791        :return: file
2792                 If the method is called asynchronously,
2793                 returns the request thread.
2794        """
2795
2796        all_params = ['account_id', 'document_id', 'template_id', 'encrypt', 'show_changes']
2797        all_params.append('callback')
2798        all_params.append('_return_http_data_only')
2799        all_params.append('_preload_content')
2800        all_params.append('_request_timeout')
2801
2802        params = locals()
2803        for key, val in iteritems(params['kwargs']):
2804            if key not in all_params:
2805                raise TypeError(
2806                    "Got an unexpected keyword argument '%s'"
2807                    " to method get_document" % key
2808                )
2809            params[key] = val
2810        del params['kwargs']
2811        # verify the required parameter 'account_id' is set
2812        if ('account_id' not in params) or (params['account_id'] is None):
2813            raise ValueError("Missing the required parameter `account_id` when calling `get_document`")
2814        # verify the required parameter 'document_id' is set
2815        if ('document_id' not in params) or (params['document_id'] is None):
2816            raise ValueError("Missing the required parameter `document_id` when calling `get_document`")
2817        # verify the required parameter 'template_id' is set
2818        if ('template_id' not in params) or (params['template_id'] is None):
2819            raise ValueError("Missing the required parameter `template_id` when calling `get_document`")
2820
2821
2822        collection_formats = {}
2823
2824        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
2825        path_params = {}
2826        if 'account_id' in params:
2827            path_params['accountId'] = params['account_id']
2828        if 'document_id' in params:
2829            path_params['documentId'] = params['document_id']
2830        if 'template_id' in params:
2831            path_params['templateId'] = params['template_id']
2832
2833        query_params = {}
2834        if 'encrypt' in params:
2835            query_params['encrypt'] = params['encrypt']
2836        if 'show_changes' in params:
2837            query_params['show_changes'] = params['show_changes']
2838
2839        header_params = {}
2840
2841        form_params = []
2842        local_var_files = {}
2843
2844        body_params = None
2845        # HTTP header `Accept`
2846        header_params['Accept'] = self.api_client.\
2847            select_header_accept(['application/pdf'])
2848
2849        # Authentication setting
2850        auth_settings = []
2851
2852        return self.api_client.call_api(resource_path, 'GET',
2853                                        path_params,
2854                                        query_params,
2855                                        header_params,
2856                                        body=body_params,
2857                                        post_params=form_params,
2858                                        files=local_var_files,
2859                                        response_type='file',
2860                                        auth_settings=auth_settings,
2861                                        callback=params.get('callback'),
2862                                        _return_http_data_only=params.get('_return_http_data_only'),
2863                                        _preload_content=params.get('_preload_content', True),
2864                                        _request_timeout=params.get('_request_timeout'),
2865                                        collection_formats=collection_formats)
2866
2867    def get_document_page_image(self, account_id, document_id, page_number, template_id, **kwargs):
2868        """
2869        Gets a page image from a template for display.
2870        Retrieves a page image for display from the specified template.
2871        This method makes a synchronous HTTP request by default. To make an
2872        asynchronous HTTP request, please define a `callback` function
2873        to be invoked when receiving the response.
2874        >>> def callback_function(response):
2875        >>>     pprint(response)
2876        >>>
2877        >>> thread = api.get_document_page_image(account_id, document_id, page_number, template_id, callback=callback_function)
2878
2879        :param callback function: The callback function
2880            for asynchronous request. (optional)
2881        :param str account_id: The external account number (int) or account ID Guid. (required)
2882        :param str document_id: The ID of the document being accessed. (required)
2883        :param str page_number: The page number being accessed. (required)
2884        :param str template_id: The ID of the template being accessed. (required)
2885        :param str dpi:
2886        :param str max_height:
2887        :param str max_width:
2888        :param str show_changes:
2889        :return: file
2890                 If the method is called asynchronously,
2891                 returns the request thread.
2892        """
2893        kwargs['_return_http_data_only'] = True
2894        if kwargs.get('callback'):
2895            return self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2896        else:
2897            (data) = self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2898            return data
2899
2900    def get_document_page_image_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
2901        """
2902        Gets a page image from a template for display.
2903        Retrieves a page image for display from the specified template.
2904        This method makes a synchronous HTTP request by default. To make an
2905        asynchronous HTTP request, please define a `callback` function
2906        to be invoked when receiving the response.
2907        >>> def callback_function(response):
2908        >>>     pprint(response)
2909        >>>
2910        >>> thread = api.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
2911
2912        :param callback function: The callback function
2913            for asynchronous request. (optional)
2914        :param str account_id: The external account number (int) or account ID Guid. (required)
2915        :param str document_id: The ID of the document being accessed. (required)
2916        :param str page_number: The page number being accessed. (required)
2917        :param str template_id: The ID of the template being accessed. (required)
2918        :param str dpi:
2919        :param str max_height:
2920        :param str max_width:
2921        :param str show_changes:
2922        :return: file
2923                 If the method is called asynchronously,
2924                 returns the request thread.
2925        """
2926
2927        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'dpi', 'max_height', 'max_width', 'show_changes']
2928        all_params.append('callback')
2929        all_params.append('_return_http_data_only')
2930        all_params.append('_preload_content')
2931        all_params.append('_request_timeout')
2932
2933        params = locals()
2934        for key, val in iteritems(params['kwargs']):
2935            if key not in all_params:
2936                raise TypeError(
2937                    "Got an unexpected keyword argument '%s'"
2938                    " to method get_document_page_image" % key
2939                )
2940            params[key] = val
2941        del params['kwargs']
2942        # verify the required parameter 'account_id' is set
2943        if ('account_id' not in params) or (params['account_id'] is None):
2944            raise ValueError("Missing the required parameter `account_id` when calling `get_document_page_image`")
2945        # verify the required parameter 'document_id' is set
2946        if ('document_id' not in params) or (params['document_id'] is None):
2947            raise ValueError("Missing the required parameter `document_id` when calling `get_document_page_image`")
2948        # verify the required parameter 'page_number' is set
2949        if ('page_number' not in params) or (params['page_number'] is None):
2950            raise ValueError("Missing the required parameter `page_number` when calling `get_document_page_image`")
2951        # verify the required parameter 'template_id' is set
2952        if ('template_id' not in params) or (params['template_id'] is None):
2953            raise ValueError("Missing the required parameter `template_id` when calling `get_document_page_image`")
2954
2955
2956        collection_formats = {}
2957
2958        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
2959        path_params = {}
2960        if 'account_id' in params:
2961            path_params['accountId'] = params['account_id']
2962        if 'document_id' in params:
2963            path_params['documentId'] = params['document_id']
2964        if 'page_number' in params:
2965            path_params['pageNumber'] = params['page_number']
2966        if 'template_id' in params:
2967            path_params['templateId'] = params['template_id']
2968
2969        query_params = {}
2970        if 'dpi' in params:
2971            query_params['dpi'] = params['dpi']
2972        if 'max_height' in params:
2973            query_params['max_height'] = params['max_height']
2974        if 'max_width' in params:
2975            query_params['max_width'] = params['max_width']
2976        if 'show_changes' in params:
2977            query_params['show_changes'] = params['show_changes']
2978
2979        header_params = {}
2980
2981        form_params = []
2982        local_var_files = {}
2983
2984        body_params = None
2985        # HTTP header `Accept`
2986        header_params['Accept'] = self.api_client.\
2987            select_header_accept(['image/png'])
2988
2989        # Authentication setting
2990        auth_settings = []
2991
2992        return self.api_client.call_api(resource_path, 'GET',
2993                                        path_params,
2994                                        query_params,
2995                                        header_params,
2996                                        body=body_params,
2997                                        post_params=form_params,
2998                                        files=local_var_files,
2999                                        response_type='file',
3000                                        auth_settings=auth_settings,
3001                                        callback=params.get('callback'),
3002                                        _return_http_data_only=params.get('_return_http_data_only'),
3003                                        _preload_content=params.get('_preload_content', True),
3004                                        _request_timeout=params.get('_request_timeout'),
3005                                        collection_formats=collection_formats)
3006
3007    def get_document_tabs(self, account_id, document_id, template_id, **kwargs):
3008        """
3009        Returns tabs on the document.
3010        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
3011        This method makes a synchronous HTTP request by default. To make an
3012        asynchronous HTTP request, please define a `callback` function
3013        to be invoked when receiving the response.
3014        >>> def callback_function(response):
3015        >>>     pprint(response)
3016        >>>
3017        >>> thread = api.get_document_tabs(account_id, document_id, template_id, callback=callback_function)
3018
3019        :param callback function: The callback function
3020            for asynchronous request. (optional)
3021        :param str account_id: The external account number (int) or account ID Guid. (required)
3022        :param str document_id: The ID of the document being accessed. (required)
3023        :param str template_id: The ID of the template being accessed. (required)
3024        :param str page_numbers:
3025        :return: Tabs
3026                 If the method is called asynchronously,
3027                 returns the request thread.
3028        """
3029        kwargs['_return_http_data_only'] = True
3030        if kwargs.get('callback'):
3031            return self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
3032        else:
3033            (data) = self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
3034            return data
3035
3036    def get_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
3037        """
3038        Returns tabs on the document.
3039        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
3040        This method makes a synchronous HTTP request by default. To make an
3041        asynchronous HTTP request, please define a `callback` function
3042        to be invoked when receiving the response.
3043        >>> def callback_function(response):
3044        >>>     pprint(response)
3045        >>>
3046        >>> thread = api.get_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
3047
3048        :param callback function: The callback function
3049            for asynchronous request. (optional)
3050        :param str account_id: The external account number (int) or account ID Guid. (required)
3051        :param str document_id: The ID of the document being accessed. (required)
3052        :param str template_id: The ID of the template being accessed. (required)
3053        :param str page_numbers:
3054        :return: Tabs
3055                 If the method is called asynchronously,
3056                 returns the request thread.
3057        """
3058
3059        all_params = ['account_id', 'document_id', 'template_id', 'page_numbers']
3060        all_params.append('callback')
3061        all_params.append('_return_http_data_only')
3062        all_params.append('_preload_content')
3063        all_params.append('_request_timeout')
3064
3065        params = locals()
3066        for key, val in iteritems(params['kwargs']):
3067            if key not in all_params:
3068                raise TypeError(
3069                    "Got an unexpected keyword argument '%s'"
3070                    " to method get_document_tabs" % key
3071                )
3072            params[key] = val
3073        del params['kwargs']
3074        # verify the required parameter 'account_id' is set
3075        if ('account_id' not in params) or (params['account_id'] is None):
3076            raise ValueError("Missing the required parameter `account_id` when calling `get_document_tabs`")
3077        # verify the required parameter 'document_id' is set
3078        if ('document_id' not in params) or (params['document_id'] is None):
3079            raise ValueError("Missing the required parameter `document_id` when calling `get_document_tabs`")
3080        # verify the required parameter 'template_id' is set
3081        if ('template_id' not in params) or (params['template_id'] is None):
3082            raise ValueError("Missing the required parameter `template_id` when calling `get_document_tabs`")
3083
3084
3085        collection_formats = {}
3086
3087        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
3088        path_params = {}
3089        if 'account_id' in params:
3090            path_params['accountId'] = params['account_id']
3091        if 'document_id' in params:
3092            path_params['documentId'] = params['document_id']
3093        if 'template_id' in params:
3094            path_params['templateId'] = params['template_id']
3095
3096        query_params = {}
3097        if 'page_numbers' in params:
3098            query_params['page_numbers'] = params['page_numbers']
3099
3100        header_params = {}
3101
3102        form_params = []
3103        local_var_files = {}
3104
3105        body_params = None
3106        # HTTP header `Accept`
3107        header_params['Accept'] = self.api_client.\
3108            select_header_accept(['application/json'])
3109
3110        # Authentication setting
3111        auth_settings = []
3112
3113        return self.api_client.call_api(resource_path, 'GET',
3114                                        path_params,
3115                                        query_params,
3116                                        header_params,
3117                                        body=body_params,
3118                                        post_params=form_params,
3119                                        files=local_var_files,
3120                                        response_type='Tabs',
3121                                        auth_settings=auth_settings,
3122                                        callback=params.get('callback'),
3123                                        _return_http_data_only=params.get('_return_http_data_only'),
3124                                        _preload_content=params.get('_preload_content', True),
3125                                        _request_timeout=params.get('_request_timeout'),
3126                                        collection_formats=collection_formats)
3127
3128    def get_lock(self, account_id, template_id, **kwargs):
3129        """
3130        Gets template lock information.
3131        Retrieves general information about the template lock.  If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header  field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header.
3132        This method makes a synchronous HTTP request by default. To make an
3133        asynchronous HTTP request, please define a `callback` function
3134        to be invoked when receiving the response.
3135        >>> def callback_function(response):
3136        >>>     pprint(response)
3137        >>>
3138        >>> thread = api.get_lock(account_id, template_id, callback=callback_function)
3139
3140        :param callback function: The callback function
3141            for asynchronous request. (optional)
3142        :param str account_id: The external account number (int) or account ID Guid. (required)
3143        :param str template_id: The ID of the template being accessed. (required)
3144        :return: LockInformation
3145                 If the method is called asynchronously,
3146                 returns the request thread.
3147        """
3148        kwargs['_return_http_data_only'] = True
3149        if kwargs.get('callback'):
3150            return self.get_lock_with_http_info(account_id, template_id, **kwargs)
3151        else:
3152            (data) = self.get_lock_with_http_info(account_id, template_id, **kwargs)
3153            return data
3154
3155    def get_lock_with_http_info(self, account_id, template_id, **kwargs):
3156        """
3157        Gets template lock information.
3158        Retrieves general information about the template lock.  If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header  field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header.
3159        This method makes a synchronous HTTP request by default. To make an
3160        asynchronous HTTP request, please define a `callback` function
3161        to be invoked when receiving the response.
3162        >>> def callback_function(response):
3163        >>>     pprint(response)
3164        >>>
3165        >>> thread = api.get_lock_with_http_info(account_id, template_id, callback=callback_function)
3166
3167        :param callback function: The callback function
3168            for asynchronous request. (optional)
3169        :param str account_id: The external account number (int) or account ID Guid. (required)
3170        :param str template_id: The ID of the template being accessed. (required)
3171        :return: LockInformation
3172                 If the method is called asynchronously,
3173                 returns the request thread.
3174        """
3175
3176        all_params = ['account_id', 'template_id']
3177        all_params.append('callback')
3178        all_params.append('_return_http_data_only')
3179        all_params.append('_preload_content')
3180        all_params.append('_request_timeout')
3181
3182        params = locals()
3183        for key, val in iteritems(params['kwargs']):
3184            if key not in all_params:
3185                raise TypeError(
3186                    "Got an unexpected keyword argument '%s'"
3187                    " to method get_lock" % key
3188                )
3189            params[key] = val
3190        del params['kwargs']
3191        # verify the required parameter 'account_id' is set
3192        if ('account_id' not in params) or (params['account_id'] is None):
3193            raise ValueError("Missing the required parameter `account_id` when calling `get_lock`")
3194        # verify the required parameter 'template_id' is set
3195        if ('template_id' not in params) or (params['template_id'] is None):
3196            raise ValueError("Missing the required parameter `template_id` when calling `get_lock`")
3197
3198
3199        collection_formats = {}
3200
3201        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
3202        path_params = {}
3203        if 'account_id' in params:
3204            path_params['accountId'] = params['account_id']
3205        if 'template_id' in params:
3206            path_params['templateId'] = params['template_id']
3207
3208        query_params = {}
3209
3210        header_params = {}
3211
3212        form_params = []
3213        local_var_files = {}
3214
3215        body_params = None
3216        # HTTP header `Accept`
3217        header_params['Accept'] = self.api_client.\
3218            select_header_accept(['application/json'])
3219
3220        # Authentication setting
3221        auth_settings = []
3222
3223        return self.api_client.call_api(resource_path, 'GET',
3224                                        path_params,
3225                                        query_params,
3226                                        header_params,
3227                                        body=body_params,
3228                                        post_params=form_params,
3229                                        files=local_var_files,
3230                                        response_type='LockInformation',
3231                                        auth_settings=auth_settings,
3232                                        callback=params.get('callback'),
3233                                        _return_http_data_only=params.get('_return_http_data_only'),
3234                                        _preload_content=params.get('_preload_content', True),
3235                                        _request_timeout=params.get('_request_timeout'),
3236                                        collection_formats=collection_formats)
3237
3238    def get_notification_settings(self, account_id, template_id, **kwargs):
3239        """
3240        Gets template notification information.
3241        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3242        This method makes a synchronous HTTP request by default. To make an
3243        asynchronous HTTP request, please define a `callback` function
3244        to be invoked when receiving the response.
3245        >>> def callback_function(response):
3246        >>>     pprint(response)
3247        >>>
3248        >>> thread = api.get_notification_settings(account_id, template_id, callback=callback_function)
3249
3250        :param callback function: The callback function
3251            for asynchronous request. (optional)
3252        :param str account_id: The external account number (int) or account ID Guid. (required)
3253        :param str template_id: The ID of the template being accessed. (required)
3254        :return: Notification
3255                 If the method is called asynchronously,
3256                 returns the request thread.
3257        """
3258        kwargs['_return_http_data_only'] = True
3259        if kwargs.get('callback'):
3260            return self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3261        else:
3262            (data) = self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3263            return data
3264
3265    def get_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
3266        """
3267        Gets template notification information.
3268        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3269        This method makes a synchronous HTTP request by default. To make an
3270        asynchronous HTTP request, please define a `callback` function
3271        to be invoked when receiving the response.
3272        >>> def callback_function(response):
3273        >>>     pprint(response)
3274        >>>
3275        >>> thread = api.get_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
3276
3277        :param callback function: The callback function
3278            for asynchronous request. (optional)
3279        :param str account_id: The external account number (int) or account ID Guid. (required)
3280        :param str template_id: The ID of the template being accessed. (required)
3281        :return: Notification
3282                 If the method is called asynchronously,
3283                 returns the request thread.
3284        """
3285
3286        all_params = ['account_id', 'template_id']
3287        all_params.append('callback')
3288        all_params.append('_return_http_data_only')
3289        all_params.append('_preload_content')
3290        all_params.append('_request_timeout')
3291
3292        params = locals()
3293        for key, val in iteritems(params['kwargs']):
3294            if key not in all_params:
3295                raise TypeError(
3296                    "Got an unexpected keyword argument '%s'"
3297                    " to method get_notification_settings" % key
3298                )
3299            params[key] = val
3300        del params['kwargs']
3301        # verify the required parameter 'account_id' is set
3302        if ('account_id' not in params) or (params['account_id'] is None):
3303            raise ValueError("Missing the required parameter `account_id` when calling `get_notification_settings`")
3304        # verify the required parameter 'template_id' is set
3305        if ('template_id' not in params) or (params['template_id'] is None):
3306            raise ValueError("Missing the required parameter `template_id` when calling `get_notification_settings`")
3307
3308
3309        collection_formats = {}
3310
3311        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
3312        path_params = {}
3313        if 'account_id' in params:
3314            path_params['accountId'] = params['account_id']
3315        if 'template_id' in params:
3316            path_params['templateId'] = params['template_id']
3317
3318        query_params = {}
3319
3320        header_params = {}
3321
3322        form_params = []
3323        local_var_files = {}
3324
3325        body_params = None
3326        # HTTP header `Accept`
3327        header_params['Accept'] = self.api_client.\
3328            select_header_accept(['application/json'])
3329
3330        # Authentication setting
3331        auth_settings = []
3332
3333        return self.api_client.call_api(resource_path, 'GET',
3334                                        path_params,
3335                                        query_params,
3336                                        header_params,
3337                                        body=body_params,
3338                                        post_params=form_params,
3339                                        files=local_var_files,
3340                                        response_type='Notification',
3341                                        auth_settings=auth_settings,
3342                                        callback=params.get('callback'),
3343                                        _return_http_data_only=params.get('_return_http_data_only'),
3344                                        _preload_content=params.get('_preload_content', True),
3345                                        _request_timeout=params.get('_request_timeout'),
3346                                        collection_formats=collection_formats)
3347
3348    def get_page_tabs(self, account_id, document_id, page_number, template_id, **kwargs):
3349        """
3350        Returns tabs on the specified page.
3351        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3352        This method makes a synchronous HTTP request by default. To make an
3353        asynchronous HTTP request, please define a `callback` function
3354        to be invoked when receiving the response.
3355        >>> def callback_function(response):
3356        >>>     pprint(response)
3357        >>>
3358        >>> thread = api.get_page_tabs(account_id, document_id, page_number, template_id, callback=callback_function)
3359
3360        :param callback function: The callback function
3361            for asynchronous request. (optional)
3362        :param str account_id: The external account number (int) or account ID Guid. (required)
3363        :param str document_id: The ID of the document being accessed. (required)
3364        :param str page_number: The page number being accessed. (required)
3365        :param str template_id: The ID of the template being accessed. (required)
3366        :return: Tabs
3367                 If the method is called asynchronously,
3368                 returns the request thread.
3369        """
3370        kwargs['_return_http_data_only'] = True
3371        if kwargs.get('callback'):
3372            return self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3373        else:
3374            (data) = self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3375            return data
3376
3377    def get_page_tabs_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
3378        """
3379        Returns tabs on the specified page.
3380        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3381        This method makes a synchronous HTTP request by default. To make an
3382        asynchronous HTTP request, please define a `callback` function
3383        to be invoked when receiving the response.
3384        >>> def callback_function(response):
3385        >>>     pprint(response)
3386        >>>
3387        >>> thread = api.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
3388
3389        :param callback function: The callback function
3390            for asynchronous request. (optional)
3391        :param str account_id: The external account number (int) or account ID Guid. (required)
3392        :param str document_id: The ID of the document being accessed. (required)
3393        :param str page_number: The page number being accessed. (required)
3394        :param str template_id: The ID of the template being accessed. (required)
3395        :return: Tabs
3396                 If the method is called asynchronously,
3397                 returns the request thread.
3398        """
3399
3400        all_params = ['account_id', 'document_id', 'page_number', 'template_id']
3401        all_params.append('callback')
3402        all_params.append('_return_http_data_only')
3403        all_params.append('_preload_content')
3404        all_params.append('_request_timeout')
3405
3406        params = locals()
3407        for key, val in iteritems(params['kwargs']):
3408            if key not in all_params:
3409                raise TypeError(
3410                    "Got an unexpected keyword argument '%s'"
3411                    " to method get_page_tabs" % key
3412                )
3413            params[key] = val
3414        del params['kwargs']
3415        # verify the required parameter 'account_id' is set
3416        if ('account_id' not in params) or (params['account_id'] is None):
3417            raise ValueError("Missing the required parameter `account_id` when calling `get_page_tabs`")
3418        # verify the required parameter 'document_id' is set
3419        if ('document_id' not in params) or (params['document_id'] is None):
3420            raise ValueError("Missing the required parameter `document_id` when calling `get_page_tabs`")
3421        # verify the required parameter 'page_number' is set
3422        if ('page_number' not in params) or (params['page_number'] is None):
3423            raise ValueError("Missing the required parameter `page_number` when calling `get_page_tabs`")
3424        # verify the required parameter 'template_id' is set
3425        if ('template_id' not in params) or (params['template_id'] is None):
3426            raise ValueError("Missing the required parameter `template_id` when calling `get_page_tabs`")
3427
3428
3429        collection_formats = {}
3430
3431        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/tabs'.replace('{format}', 'json')
3432        path_params = {}
3433        if 'account_id' in params:
3434            path_params['accountId'] = params['account_id']
3435        if 'document_id' in params:
3436            path_params['documentId'] = params['document_id']
3437        if 'page_number' in params:
3438            path_params['pageNumber'] = params['page_number']
3439        if 'template_id' in params:
3440            path_params['templateId'] = params['template_id']
3441
3442        query_params = {}
3443
3444        header_params = {}
3445
3446        form_params = []
3447        local_var_files = {}
3448
3449        body_params = None
3450        # HTTP header `Accept`
3451        header_params['Accept'] = self.api_client.\
3452            select_header_accept(['application/json'])
3453
3454        # Authentication setting
3455        auth_settings = []
3456
3457        return self.api_client.call_api(resource_path, 'GET',
3458                                        path_params,
3459                                        query_params,
3460                                        header_params,
3461                                        body=body_params,
3462                                        post_params=form_params,
3463                                        files=local_var_files,
3464                                        response_type='Tabs',
3465                                        auth_settings=auth_settings,
3466                                        callback=params.get('callback'),
3467                                        _return_http_data_only=params.get('_return_http_data_only'),
3468                                        _preload_content=params.get('_preload_content', True),
3469                                        _request_timeout=params.get('_request_timeout'),
3470                                        collection_formats=collection_formats)
3471
3472    def get_pages(self, account_id, document_id, template_id, **kwargs):
3473        """
3474        Returns document page image(s) based on input.
3475        Returns images of the pages in a template document for display based on the parameters that you specify.
3476        This method makes a synchronous HTTP request by default. To make an
3477        asynchronous HTTP request, please define a `callback` function
3478        to be invoked when receiving the response.
3479        >>> def callback_function(response):
3480        >>>     pprint(response)
3481        >>>
3482        >>> thread = api.get_pages(account_id, document_id, template_id, callback=callback_function)
3483
3484        :param callback function: The callback function
3485            for asynchronous request. (optional)
3486        :param str account_id: The external account number (int) or account ID Guid. (required)
3487        :param str document_id: The ID of the document being accessed. (required)
3488        :param str template_id: The ID of the template being accessed. (required)
3489        :param str count:
3490        :param str dpi:
3491        :param str max_height:
3492        :param str max_width:
3493        :param str nocache:
3494        :param str show_changes:
3495        :param str start_position:
3496        :return: PageImages
3497                 If the method is called asynchronously,
3498                 returns the request thread.
3499        """
3500        kwargs['_return_http_data_only'] = True
3501        if kwargs.get('callback'):
3502            return self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3503        else:
3504            (data) = self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3505            return data
3506
3507    def get_pages_with_http_info(self, account_id, document_id, template_id, **kwargs):
3508        """
3509        Returns document page image(s) based on input.
3510        Returns images of the pages in a template document for display based on the parameters that you specify.
3511        This method makes a synchronous HTTP request by default. To make an
3512        asynchronous HTTP request, please define a `callback` function
3513        to be invoked when receiving the response.
3514        >>> def callback_function(response):
3515        >>>     pprint(response)
3516        >>>
3517        >>> thread = api.get_pages_with_http_info(account_id, document_id, template_id, callback=callback_function)
3518
3519        :param callback function: The callback function
3520            for asynchronous request. (optional)
3521        :param str account_id: The external account number (int) or account ID Guid. (required)
3522        :param str document_id: The ID of the document being accessed. (required)
3523        :param str template_id: The ID of the template being accessed. (required)
3524        :param str count:
3525        :param str dpi:
3526        :param str max_height:
3527        :param str max_width:
3528        :param str nocache:
3529        :param str show_changes:
3530        :param str start_position:
3531        :return: PageImages
3532                 If the method is called asynchronously,
3533                 returns the request thread.
3534        """
3535
3536        all_params = ['account_id', 'document_id', 'template_id', 'count', 'dpi', 'max_height', 'max_width', 'nocache', 'show_changes', 'start_position']
3537        all_params.append('callback')
3538        all_params.append('_return_http_data_only')
3539        all_params.append('_preload_content')
3540        all_params.append('_request_timeout')
3541
3542        params = locals()
3543        for key, val in iteritems(params['kwargs']):
3544            if key not in all_params:
3545                raise TypeError(
3546                    "Got an unexpected keyword argument '%s'"
3547                    " to method get_pages" % key
3548                )
3549            params[key] = val
3550        del params['kwargs']
3551        # verify the required parameter 'account_id' is set
3552        if ('account_id' not in params) or (params['account_id'] is None):
3553            raise ValueError("Missing the required parameter `account_id` when calling `get_pages`")
3554        # verify the required parameter 'document_id' is set
3555        if ('document_id' not in params) or (params['document_id'] is None):
3556            raise ValueError("Missing the required parameter `document_id` when calling `get_pages`")
3557        # verify the required parameter 'template_id' is set
3558        if ('template_id' not in params) or (params['template_id'] is None):
3559            raise ValueError("Missing the required parameter `template_id` when calling `get_pages`")
3560
3561
3562        collection_formats = {}
3563
3564        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages'.replace('{format}', 'json')
3565        path_params = {}
3566        if 'account_id' in params:
3567            path_params['accountId'] = params['account_id']
3568        if 'document_id' in params:
3569            path_params['documentId'] = params['document_id']
3570        if 'template_id' in params:
3571            path_params['templateId'] = params['template_id']
3572
3573        query_params = {}
3574        if 'count' in params:
3575            query_params['count'] = params['count']
3576        if 'dpi' in params:
3577            query_params['dpi'] = params['dpi']
3578        if 'max_height' in params:
3579            query_params['max_height'] = params['max_height']
3580        if 'max_width' in params:
3581            query_params['max_width'] = params['max_width']
3582        if 'nocache' in params:
3583            query_params['nocache'] = params['nocache']
3584        if 'show_changes' in params:
3585            query_params['show_changes'] = params['show_changes']
3586        if 'start_position' in params:
3587            query_params['start_position'] = params['start_position']
3588
3589        header_params = {}
3590
3591        form_params = []
3592        local_var_files = {}
3593
3594        body_params = None
3595        # HTTP header `Accept`
3596        header_params['Accept'] = self.api_client.\
3597            select_header_accept(['application/json'])
3598
3599        # Authentication setting
3600        auth_settings = []
3601
3602        return self.api_client.call_api(resource_path, 'GET',
3603                                        path_params,
3604                                        query_params,
3605                                        header_params,
3606                                        body=body_params,
3607                                        post_params=form_params,
3608                                        files=local_var_files,
3609                                        response_type='PageImages',
3610                                        auth_settings=auth_settings,
3611                                        callback=params.get('callback'),
3612                                        _return_http_data_only=params.get('_return_http_data_only'),
3613                                        _preload_content=params.get('_preload_content', True),
3614                                        _request_timeout=params.get('_request_timeout'),
3615                                        collection_formats=collection_formats)
3616
3617    def get_template_document_html_definitions(self, account_id, document_id, template_id, **kwargs):
3618        """
3619        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3620        
3621        This method makes a synchronous HTTP request by default. To make an
3622        asynchronous HTTP request, please define a `callback` function
3623        to be invoked when receiving the response.
3624        >>> def callback_function(response):
3625        >>>     pprint(response)
3626        >>>
3627        >>> thread = api.get_template_document_html_definitions(account_id, document_id, template_id, callback=callback_function)
3628
3629        :param callback function: The callback function
3630            for asynchronous request. (optional)
3631        :param str account_id: The external account number (int) or account ID Guid. (required)
3632        :param str document_id: The ID of the document being accessed. (required)
3633        :param str template_id: The ID of the template being accessed. (required)
3634        :return: DocumentHtmlDefinitionOriginals
3635                 If the method is called asynchronously,
3636                 returns the request thread.
3637        """
3638        kwargs['_return_http_data_only'] = True
3639        if kwargs.get('callback'):
3640            return self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3641        else:
3642            (data) = self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3643            return data
3644
3645    def get_template_document_html_definitions_with_http_info(self, account_id, document_id, template_id, **kwargs):
3646        """
3647        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3648        
3649        This method makes a synchronous HTTP request by default. To make an
3650        asynchronous HTTP request, please define a `callback` function
3651        to be invoked when receiving the response.
3652        >>> def callback_function(response):
3653        >>>     pprint(response)
3654        >>>
3655        >>> thread = api.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, callback=callback_function)
3656
3657        :param callback function: The callback function
3658            for asynchronous request. (optional)
3659        :param str account_id: The external account number (int) or account ID Guid. (required)
3660        :param str document_id: The ID of the document being accessed. (required)
3661        :param str template_id: The ID of the template being accessed. (required)
3662        :return: DocumentHtmlDefinitionOriginals
3663                 If the method is called asynchronously,
3664                 returns the request thread.
3665        """
3666
3667        all_params = ['account_id', 'document_id', 'template_id']
3668        all_params.append('callback')
3669        all_params.append('_return_http_data_only')
3670        all_params.append('_preload_content')
3671        all_params.append('_request_timeout')
3672
3673        params = locals()
3674        for key, val in iteritems(params['kwargs']):
3675            if key not in all_params:
3676                raise TypeError(
3677                    "Got an unexpected keyword argument '%s'"
3678                    " to method get_template_document_html_definitions" % key
3679                )
3680            params[key] = val
3681        del params['kwargs']
3682        # verify the required parameter 'account_id' is set
3683        if ('account_id' not in params) or (params['account_id'] is None):
3684            raise ValueError("Missing the required parameter `account_id` when calling `get_template_document_html_definitions`")
3685        # verify the required parameter 'document_id' is set
3686        if ('document_id' not in params) or (params['document_id'] is None):
3687            raise ValueError("Missing the required parameter `document_id` when calling `get_template_document_html_definitions`")
3688        # verify the required parameter 'template_id' is set
3689        if ('template_id' not in params) or (params['template_id'] is None):
3690            raise ValueError("Missing the required parameter `template_id` when calling `get_template_document_html_definitions`")
3691
3692
3693        collection_formats = {}
3694
3695        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/html_definitions'.replace('{format}', 'json')
3696        path_params = {}
3697        if 'account_id' in params:
3698            path_params['accountId'] = params['account_id']
3699        if 'document_id' in params:
3700            path_params['documentId'] = params['document_id']
3701        if 'template_id' in params:
3702            path_params['templateId'] = params['template_id']
3703
3704        query_params = {}
3705
3706        header_params = {}
3707
3708        form_params = []
3709        local_var_files = {}
3710
3711        body_params = None
3712        # HTTP header `Accept`
3713        header_params['Accept'] = self.api_client.\
3714            select_header_accept(['application/json'])
3715
3716        # Authentication setting
3717        auth_settings = []
3718
3719        return self.api_client.call_api(resource_path, 'GET',
3720                                        path_params,
3721                                        query_params,
3722                                        header_params,
3723                                        body=body_params,
3724                                        post_params=form_params,
3725                                        files=local_var_files,
3726                                        response_type='DocumentHtmlDefinitionOriginals',
3727                                        auth_settings=auth_settings,
3728                                        callback=params.get('callback'),
3729                                        _return_http_data_only=params.get('_return_http_data_only'),
3730                                        _preload_content=params.get('_preload_content', True),
3731                                        _request_timeout=params.get('_request_timeout'),
3732                                        collection_formats=collection_formats)
3733
3734    def get_template_html_definitions(self, account_id, template_id, **kwargs):
3735        """
3736        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3737        
3738        This method makes a synchronous HTTP request by default. To make an
3739        asynchronous HTTP request, please define a `callback` function
3740        to be invoked when receiving the response.
3741        >>> def callback_function(response):
3742        >>>     pprint(response)
3743        >>>
3744        >>> thread = api.get_template_html_definitions(account_id, template_id, callback=callback_function)
3745
3746        :param callback function: The callback function
3747            for asynchronous request. (optional)
3748        :param str account_id: The external account number (int) or account ID Guid. (required)
3749        :param str template_id: The ID of the template being accessed. (required)
3750        :return: DocumentHtmlDefinitionOriginals
3751                 If the method is called asynchronously,
3752                 returns the request thread.
3753        """
3754        kwargs['_return_http_data_only'] = True
3755        if kwargs.get('callback'):
3756            return self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3757        else:
3758            (data) = self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3759            return data
3760
3761    def get_template_html_definitions_with_http_info(self, account_id, template_id, **kwargs):
3762        """
3763        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3764        
3765        This method makes a synchronous HTTP request by default. To make an
3766        asynchronous HTTP request, please define a `callback` function
3767        to be invoked when receiving the response.
3768        >>> def callback_function(response):
3769        >>>     pprint(response)
3770        >>>
3771        >>> thread = api.get_template_html_definitions_with_http_info(account_id, template_id, callback=callback_function)
3772
3773        :param callback function: The callback function
3774            for asynchronous request. (optional)
3775        :param str account_id: The external account number (int) or account ID Guid. (required)
3776        :param str template_id: The ID of the template being accessed. (required)
3777        :return: DocumentHtmlDefinitionOriginals
3778                 If the method is called asynchronously,
3779                 returns the request thread.
3780        """
3781
3782        all_params = ['account_id', 'template_id']
3783        all_params.append('callback')
3784        all_params.append('_return_http_data_only')
3785        all_params.append('_preload_content')
3786        all_params.append('_request_timeout')
3787
3788        params = locals()
3789        for key, val in iteritems(params['kwargs']):
3790            if key not in all_params:
3791                raise TypeError(
3792                    "Got an unexpected keyword argument '%s'"
3793                    " to method get_template_html_definitions" % key
3794                )
3795            params[key] = val
3796        del params['kwargs']
3797        # verify the required parameter 'account_id' is set
3798        if ('account_id' not in params) or (params['account_id'] is None):
3799            raise ValueError("Missing the required parameter `account_id` when calling `get_template_html_definitions`")
3800        # verify the required parameter 'template_id' is set
3801        if ('template_id' not in params) or (params['template_id'] is None):
3802            raise ValueError("Missing the required parameter `template_id` when calling `get_template_html_definitions`")
3803
3804
3805        collection_formats = {}
3806
3807        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/html_definitions'.replace('{format}', 'json')
3808        path_params = {}
3809        if 'account_id' in params:
3810            path_params['accountId'] = params['account_id']
3811        if 'template_id' in params:
3812            path_params['templateId'] = params['template_id']
3813
3814        query_params = {}
3815
3816        header_params = {}
3817
3818        form_params = []
3819        local_var_files = {}
3820
3821        body_params = None
3822        # HTTP header `Accept`
3823        header_params['Accept'] = self.api_client.\
3824            select_header_accept(['application/json'])
3825
3826        # Authentication setting
3827        auth_settings = []
3828
3829        return self.api_client.call_api(resource_path, 'GET',
3830                                        path_params,
3831                                        query_params,
3832                                        header_params,
3833                                        body=body_params,
3834                                        post_params=form_params,
3835                                        files=local_var_files,
3836                                        response_type='DocumentHtmlDefinitionOriginals',
3837                                        auth_settings=auth_settings,
3838                                        callback=params.get('callback'),
3839                                        _return_http_data_only=params.get('_return_http_data_only'),
3840                                        _preload_content=params.get('_preload_content', True),
3841                                        _request_timeout=params.get('_request_timeout'),
3842                                        collection_formats=collection_formats)
3843
3844    def list_bulk_recipients(self, account_id, recipient_id, template_id, **kwargs):
3845        """
3846        Gets the bulk recipient file from a template.
3847        Retrieves the bulk recipient file information from a template that has a bulk recipient.
3848        This method makes a synchronous HTTP request by default. To make an
3849        asynchronous HTTP request, please define a `callback` function
3850        to be invoked when receiving the response.
3851        >>> def callback_function(response):
3852        >>>     pprint(response)
3853        >>>
3854        >>> thread = api.list_bulk_recipients(account_id, recipient_id, template_id, callback=callback_function)
3855
3856        :param callback function: The callback function
3857            for asynchronous request. (optional)
3858        :param str account_id: The external account number (int) or account ID Guid. (required)
3859        :param str recipient_id: The ID of the recipient being accessed. (required)
3860        :param str template_id: The ID of the template being accessed. (required)
3861        :param str include_tabs:
3862        :param str start_position:
3863        :return: BulkRecipientsResponse
3864                 If the method is called asynchronously,
3865                 returns the request thread.
3866        """
3867        kwargs['_return_http_data_only'] = True
3868        if kwargs.get('callback'):
3869            return self.list_bulk_recipients_with_http_info(account_id, recipient_id, template_id, **kwargs)
3870        else:
3871            (data) = self.list_bulk_recipients_with_http_info(account_id, recipient_id, template_id, **kwargs)
3872            return data
3873
3874    def list_bulk_recipients_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
3875        """
3876        Gets the bulk recipient file from a template.
3877        Retrieves the bulk recipient file information from a template that has a bulk recipient.
3878        This method makes a synchronous HTTP request by default. To make an
3879        asynchronous HTTP request, please define a `callback` function
3880        to be invoked when receiving the response.
3881        >>> def callback_function(response):
3882        >>>     pprint(response)
3883        >>>
3884        >>> thread = api.list_bulk_recipients_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
3885
3886        :param callback function: The callback function
3887            for asynchronous request. (optional)
3888        :param str account_id: The external account number (int) or account ID Guid. (required)
3889        :param str recipient_id: The ID of the recipient being accessed. (required)
3890        :param str template_id: The ID of the template being accessed. (required)
3891        :param str include_tabs:
3892        :param str start_position:
3893        :return: BulkRecipientsResponse
3894                 If the method is called asynchronously,
3895                 returns the request thread.
3896        """
3897
3898        all_params = ['account_id', 'recipient_id', 'template_id', 'include_tabs', 'start_position']
3899        all_params.append('callback')
3900        all_params.append('_return_http_data_only')
3901        all_params.append('_preload_content')
3902        all_params.append('_request_timeout')
3903
3904        params = locals()
3905        for key, val in iteritems(params['kwargs']):
3906            if key not in all_params:
3907                raise TypeError(
3908                    "Got an unexpected keyword argument '%s'"
3909                    " to method list_bulk_recipients" % key
3910                )
3911            params[key] = val
3912        del params['kwargs']
3913        # verify the required parameter 'account_id' is set
3914        if ('account_id' not in params) or (params['account_id'] is None):
3915            raise ValueError("Missing the required parameter `account_id` when calling `list_bulk_recipients`")
3916        # verify the required parameter 'recipient_id' is set
3917        if ('recipient_id' not in params) or (params['recipient_id'] is None):
3918            raise ValueError("Missing the required parameter `recipient_id` when calling `list_bulk_recipients`")
3919        # verify the required parameter 'template_id' is set
3920        if ('template_id' not in params) or (params['template_id'] is None):
3921            raise ValueError("Missing the required parameter `template_id` when calling `list_bulk_recipients`")
3922
3923
3924        collection_formats = {}
3925
3926        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/bulk_recipients'.replace('{format}', 'json')
3927        path_params = {}
3928        if 'account_id' in params:
3929            path_params['accountId'] = params['account_id']
3930        if 'recipient_id' in params:
3931            path_params['recipientId'] = params['recipient_id']
3932        if 'template_id' in params:
3933            path_params['templateId'] = params['template_id']
3934
3935        query_params = {}
3936        if 'include_tabs' in params:
3937            query_params['include_tabs'] = params['include_tabs']
3938        if 'start_position' in params:
3939            query_params['start_position'] = params['start_position']
3940
3941        header_params = {}
3942
3943        form_params = []
3944        local_var_files = {}
3945
3946        body_params = None
3947        # HTTP header `Accept`
3948        header_params['Accept'] = self.api_client.\
3949            select_header_accept(['application/json'])
3950
3951        # Authentication setting
3952        auth_settings = []
3953
3954        return self.api_client.call_api(resource_path, 'GET',
3955                                        path_params,
3956                                        query_params,
3957                                        header_params,
3958                                        body=body_params,
3959                                        post_params=form_params,
3960                                        files=local_var_files,
3961                                        response_type='BulkRecipientsResponse',
3962                                        auth_settings=auth_settings,
3963                                        callback=params.get('callback'),
3964                                        _return_http_data_only=params.get('_return_http_data_only'),
3965                                        _preload_content=params.get('_preload_content', True),
3966                                        _request_timeout=params.get('_request_timeout'),
3967                                        collection_formats=collection_formats)
3968
3969    def list_custom_fields(self, account_id, template_id, **kwargs):
3970        """
3971        Gets the custom document fields from a template.
3972        Retrieves the custom document field information from an existing template.
3973        This method makes a synchronous HTTP request by default. To make an
3974        asynchronous HTTP request, please define a `callback` function
3975        to be invoked when receiving the response.
3976        >>> def callback_function(response):
3977        >>>     pprint(response)
3978        >>>
3979        >>> thread = api.list_custom_fields(account_id, template_id, callback=callback_function)
3980
3981        :param callback function: The callback function
3982            for asynchronous request. (optional)
3983        :param str account_id: The external account number (int) or account ID Guid. (required)
3984        :param str template_id: The ID of the template being accessed. (required)
3985        :return: CustomFields
3986                 If the method is called asynchronously,
3987                 returns the request thread.
3988        """
3989        kwargs['_return_http_data_only'] = True
3990        if kwargs.get('callback'):
3991            return self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3992        else:
3993            (data) = self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3994            return data
3995
3996    def list_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
3997        """
3998        Gets the custom document fields from a template.
3999        Retrieves the custom document field information from an existing template.
4000        This method makes a synchronous HTTP request by default. To make an
4001        asynchronous HTTP request, please define a `callback` function
4002        to be invoked when receiving the response.
4003        >>> def callback_function(response):
4004        >>>     pprint(response)
4005        >>>
4006        >>> thread = api.list_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
4007
4008        :param callback function: The callback function
4009            for asynchronous request. (optional)
4010        :param str account_id: The external account number (int) or account ID Guid. (required)
4011        :param str template_id: The ID of the template being accessed. (required)
4012        :return: CustomFields
4013                 If the method is called asynchronously,
4014                 returns the request thread.
4015        """
4016
4017        all_params = ['account_id', 'template_id']
4018        all_params.append('callback')
4019        all_params.append('_return_http_data_only')
4020        all_params.append('_preload_content')
4021        all_params.append('_request_timeout')
4022
4023        params = locals()
4024        for key, val in iteritems(params['kwargs']):
4025            if key not in all_params:
4026                raise TypeError(
4027                    "Got an unexpected keyword argument '%s'"
4028                    " to method list_custom_fields" % key
4029                )
4030            params[key] = val
4031        del params['kwargs']
4032        # verify the required parameter 'account_id' is set
4033        if ('account_id' not in params) or (params['account_id'] is None):
4034            raise ValueError("Missing the required parameter `account_id` when calling `list_custom_fields`")
4035        # verify the required parameter 'template_id' is set
4036        if ('template_id' not in params) or (params['template_id'] is None):
4037            raise ValueError("Missing the required parameter `template_id` when calling `list_custom_fields`")
4038
4039
4040        collection_formats = {}
4041
4042        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
4043        path_params = {}
4044        if 'account_id' in params:
4045            path_params['accountId'] = params['account_id']
4046        if 'template_id' in params:
4047            path_params['templateId'] = params['template_id']
4048
4049        query_params = {}
4050
4051        header_params = {}
4052
4053        form_params = []
4054        local_var_files = {}
4055
4056        body_params = None
4057        # HTTP header `Accept`
4058        header_params['Accept'] = self.api_client.\
4059            select_header_accept(['application/json'])
4060
4061        # Authentication setting
4062        auth_settings = []
4063
4064        return self.api_client.call_api(resource_path, 'GET',
4065                                        path_params,
4066                                        query_params,
4067                                        header_params,
4068                                        body=body_params,
4069                                        post_params=form_params,
4070                                        files=local_var_files,
4071                                        response_type='CustomFields',
4072                                        auth_settings=auth_settings,
4073                                        callback=params.get('callback'),
4074                                        _return_http_data_only=params.get('_return_http_data_only'),
4075                                        _preload_content=params.get('_preload_content', True),
4076                                        _request_timeout=params.get('_request_timeout'),
4077                                        collection_formats=collection_formats)
4078
4079    def list_document_fields(self, account_id, document_id, template_id, **kwargs):
4080        """
4081        Gets the custom document fields for a an existing template document.
4082        Retrieves the custom document fields for an existing template document.
4083        This method makes a synchronous HTTP request by default. To make an
4084        asynchronous HTTP request, please define a `callback` function
4085        to be invoked when receiving the response.
4086        >>> def callback_function(response):
4087        >>>     pprint(response)
4088        >>>
4089        >>> thread = api.list_document_fields(account_id, document_id, template_id, callback=callback_function)
4090
4091        :param callback function: The callback function
4092            for asynchronous request. (optional)
4093        :param str account_id: The external account number (int) or account ID Guid. (required)
4094        :param str document_id: The ID of the document being accessed. (required)
4095        :param str template_id: The ID of the template being accessed. (required)
4096        :return: DocumentFieldsInformation
4097                 If the method is called asynchronously,
4098                 returns the request thread.
4099        """
4100        kwargs['_return_http_data_only'] = True
4101        if kwargs.get('callback'):
4102            return self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
4103        else:
4104            (data) = self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
4105            return data
4106
4107    def list_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
4108        """
4109        Gets the custom document fields for a an existing template document.
4110        Retrieves the custom document fields for an existing template document.
4111        This method makes a synchronous HTTP request by default. To make an
4112        asynchronous HTTP request, please define a `callback` function
4113        to be invoked when receiving the response.
4114        >>> def callback_function(response):
4115        >>>     pprint(response)
4116        >>>
4117        >>> thread = api.list_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
4118
4119        :param callback function: The callback function
4120            for asynchronous request. (optional)
4121        :param str account_id: The external account number (int) or account ID Guid. (required)
4122        :param str document_id: The ID of the document being accessed. (required)
4123        :param str template_id: The ID of the template being accessed. (required)
4124        :return: DocumentFieldsInformation
4125                 If the method is called asynchronously,
4126                 returns the request thread.
4127        """
4128
4129        all_params = ['account_id', 'document_id', 'template_id']
4130        all_params.append('callback')
4131        all_params.append('_return_http_data_only')
4132        all_params.append('_preload_content')
4133        all_params.append('_request_timeout')
4134
4135        params = locals()
4136        for key, val in iteritems(params['kwargs']):
4137            if key not in all_params:
4138                raise TypeError(
4139                    "Got an unexpected keyword argument '%s'"
4140                    " to method list_document_fields" % key
4141                )
4142            params[key] = val
4143        del params['kwargs']
4144        # verify the required parameter 'account_id' is set
4145        if ('account_id' not in params) or (params['account_id'] is None):
4146            raise ValueError("Missing the required parameter `account_id` when calling `list_document_fields`")
4147        # verify the required parameter 'document_id' is set
4148        if ('document_id' not in params) or (params['document_id'] is None):
4149            raise ValueError("Missing the required parameter `document_id` when calling `list_document_fields`")
4150        # verify the required parameter 'template_id' is set
4151        if ('template_id' not in params) or (params['template_id'] is None):
4152            raise ValueError("Missing the required parameter `template_id` when calling `list_document_fields`")
4153
4154
4155        collection_formats = {}
4156
4157        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
4158        path_params = {}
4159        if 'account_id' in params:
4160            path_params['accountId'] = params['account_id']
4161        if 'document_id' in params:
4162            path_params['documentId'] = params['document_id']
4163        if 'template_id' in params:
4164            path_params['templateId'] = params['template_id']
4165
4166        query_params = {}
4167
4168        header_params = {}
4169
4170        form_params = []
4171        local_var_files = {}
4172
4173        body_params = None
4174        # HTTP header `Accept`
4175        header_params['Accept'] = self.api_client.\
4176            select_header_accept(['application/json'])
4177
4178        # Authentication setting
4179        auth_settings = []
4180
4181        return self.api_client.call_api(resource_path, 'GET',
4182                                        path_params,
4183                                        query_params,
4184                                        header_params,
4185                                        body=body_params,
4186                                        post_params=form_params,
4187                                        files=local_var_files,
4188                                        response_type='DocumentFieldsInformation',
4189                                        auth_settings=auth_settings,
4190                                        callback=params.get('callback'),
4191                                        _return_http_data_only=params.get('_return_http_data_only'),
4192                                        _preload_content=params.get('_preload_content', True),
4193                                        _request_timeout=params.get('_request_timeout'),
4194                                        collection_formats=collection_formats)
4195
4196    def list_documents(self, account_id, template_id, **kwargs):
4197        """
4198        Gets a list of documents associated with a template.
4199        Retrieves a list of documents associated with the specified template.
4200        This method makes a synchronous HTTP request by default. To make an
4201        asynchronous HTTP request, please define a `callback` function
4202        to be invoked when receiving the response.
4203        >>> def callback_function(response):
4204        >>>     pprint(response)
4205        >>>
4206        >>> thread = api.list_documents(account_id, template_id, callback=callback_function)
4207
4208        :param callback function: The callback function
4209            for asynchronous request. (optional)
4210        :param str account_id: The external account number (int) or account ID Guid. (required)
4211        :param str template_id: The ID of the template being accessed. (required)
4212        :param str include_tabs:
4213        :return: TemplateDocumentsResult
4214                 If the method is called asynchronously,
4215                 returns the request thread.
4216        """
4217        kwargs['_return_http_data_only'] = True
4218        if kwargs.get('callback'):
4219            return self.list_documents_with_http_info(account_id, template_id, **kwargs)
4220        else:
4221            (data) = self.list_documents_with_http_info(account_id, template_id, **kwargs)
4222            return data
4223
4224    def list_documents_with_http_info(self, account_id, template_id, **kwargs):
4225        """
4226        Gets a list of documents associated with a template.
4227        Retrieves a list of documents associated with the specified template.
4228        This method makes a synchronous HTTP request by default. To make an
4229        asynchronous HTTP request, please define a `callback` function
4230        to be invoked when receiving the response.
4231        >>> def callback_function(response):
4232        >>>     pprint(response)
4233        >>>
4234        >>> thread = api.list_documents_with_http_info(account_id, template_id, callback=callback_function)
4235
4236        :param callback function: The callback function
4237            for asynchronous request. (optional)
4238        :param str account_id: The external account number (int) or account ID Guid. (required)
4239        :param str template_id: The ID of the template being accessed. (required)
4240        :param str include_tabs:
4241        :return: TemplateDocumentsResult
4242                 If the method is called asynchronously,
4243                 returns the request thread.
4244        """
4245
4246        all_params = ['account_id', 'template_id', 'include_tabs']
4247        all_params.append('callback')
4248        all_params.append('_return_http_data_only')
4249        all_params.append('_preload_content')
4250        all_params.append('_request_timeout')
4251
4252        params = locals()
4253        for key, val in iteritems(params['kwargs']):
4254            if key not in all_params:
4255                raise TypeError(
4256                    "Got an unexpected keyword argument '%s'"
4257                    " to method list_documents" % key
4258                )
4259            params[key] = val
4260        del params['kwargs']
4261        # verify the required parameter 'account_id' is set
4262        if ('account_id' not in params) or (params['account_id'] is None):
4263            raise ValueError("Missing the required parameter `account_id` when calling `list_documents`")
4264        # verify the required parameter 'template_id' is set
4265        if ('template_id' not in params) or (params['template_id'] is None):
4266            raise ValueError("Missing the required parameter `template_id` when calling `list_documents`")
4267
4268
4269        collection_formats = {}
4270
4271        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
4272        path_params = {}
4273        if 'account_id' in params:
4274            path_params['accountId'] = params['account_id']
4275        if 'template_id' in params:
4276            path_params['templateId'] = params['template_id']
4277
4278        query_params = {}
4279        if 'include_tabs' in params:
4280            query_params['include_tabs'] = params['include_tabs']
4281
4282        header_params = {}
4283
4284        form_params = []
4285        local_var_files = {}
4286
4287        body_params = None
4288        # HTTP header `Accept`
4289        header_params['Accept'] = self.api_client.\
4290            select_header_accept(['application/json'])
4291
4292        # Authentication setting
4293        auth_settings = []
4294
4295        return self.api_client.call_api(resource_path, 'GET',
4296                                        path_params,
4297                                        query_params,
4298                                        header_params,
4299                                        body=body_params,
4300                                        post_params=form_params,
4301                                        files=local_var_files,
4302                                        response_type='TemplateDocumentsResult',
4303                                        auth_settings=auth_settings,
4304                                        callback=params.get('callback'),
4305                                        _return_http_data_only=params.get('_return_http_data_only'),
4306                                        _preload_content=params.get('_preload_content', True),
4307                                        _request_timeout=params.get('_request_timeout'),
4308                                        collection_formats=collection_formats)
4309
4310    def list_recipients(self, account_id, template_id, **kwargs):
4311        """
4312        Gets recipient information from a template.
4313        Retrieves the information for all recipients in the specified template.
4314        This method makes a synchronous HTTP request by default. To make an
4315        asynchronous HTTP request, please define a `callback` function
4316        to be invoked when receiving the response.
4317        >>> def callback_function(response):
4318        >>>     pprint(response)
4319        >>>
4320        >>> thread = api.list_recipients(account_id, template_id, callback=callback_function)
4321
4322        :param callback function: The callback function
4323            for asynchronous request. (optional)
4324        :param str account_id: The external account number (int) or account ID Guid. (required)
4325        :param str template_id: The ID of the template being accessed. (required)
4326        :param str include_anchor_tab_locations:  When set to **true** and `include_tabs` is set to **true**, all tabs with anchor tab properties are included in the response. 
4327        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4328        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4329        :return: Recipients
4330                 If the method is called asynchronously,
4331                 returns the request thread.
4332        """
4333        kwargs['_return_http_data_only'] = True
4334        if kwargs.get('callback'):
4335            return self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4336        else:
4337            (data) = self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4338            return data
4339
4340    def list_recipients_with_http_info(self, account_id, template_id, **kwargs):
4341        """
4342        Gets recipient information from a template.
4343        Retrieves the information for all recipients in the specified template.
4344        This method makes a synchronous HTTP request by default. To make an
4345        asynchronous HTTP request, please define a `callback` function
4346        to be invoked when receiving the response.
4347        >>> def callback_function(response):
4348        >>>     pprint(response)
4349        >>>
4350        >>> thread = api.list_recipients_with_http_info(account_id, template_id, callback=callback_function)
4351
4352        :param callback function: The callback function
4353            for asynchronous request. (optional)
4354        :param str account_id: The external account number (int) or account ID Guid. (required)
4355        :param str template_id: The ID of the template being accessed. (required)
4356        :param str include_anchor_tab_locations:  When set to **true** and `include_tabs` is set to **true**, all tabs with anchor tab properties are included in the response. 
4357        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4358        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4359        :return: Recipients
4360                 If the method is called asynchronously,
4361                 returns the request thread.
4362        """
4363
4364        all_params = ['account_id', 'template_id', 'include_anchor_tab_locations', 'include_extended', 'include_tabs']
4365        all_params.append('callback')
4366        all_params.append('_return_http_data_only')
4367        all_params.append('_preload_content')
4368        all_params.append('_request_timeout')
4369
4370        params = locals()
4371        for key, val in iteritems(params['kwargs']):
4372            if key not in all_params:
4373                raise TypeError(
4374                    "Got an unexpected keyword argument '%s'"
4375                    " to method list_recipients" % key
4376                )
4377            params[key] = val
4378        del params['kwargs']
4379        # verify the required parameter 'account_id' is set
4380        if ('account_id' not in params) or (params['account_id'] is None):
4381            raise ValueError("Missing the required parameter `account_id` when calling `list_recipients`")
4382        # verify the required parameter 'template_id' is set
4383        if ('template_id' not in params) or (params['template_id'] is None):
4384            raise ValueError("Missing the required parameter `template_id` when calling `list_recipients`")
4385
4386
4387        collection_formats = {}
4388
4389        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
4390        path_params = {}
4391        if 'account_id' in params:
4392            path_params['accountId'] = params['account_id']
4393        if 'template_id' in params:
4394            path_params['templateId'] = params['template_id']
4395
4396        query_params = {}
4397        if 'include_anchor_tab_locations' in params:
4398            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4399        if 'include_extended' in params:
4400            query_params['include_extended'] = params['include_extended']
4401        if 'include_tabs' in params:
4402            query_params['include_tabs'] = params['include_tabs']
4403
4404        header_params = {}
4405
4406        form_params = []
4407        local_var_files = {}
4408
4409        body_params = None
4410        # HTTP header `Accept`
4411        header_params['Accept'] = self.api_client.\
4412            select_header_accept(['application/json'])
4413
4414        # Authentication setting
4415        auth_settings = []
4416
4417        return self.api_client.call_api(resource_path, 'GET',
4418                                        path_params,
4419                                        query_params,
4420                                        header_params,
4421                                        body=body_params,
4422                                        post_params=form_params,
4423                                        files=local_var_files,
4424                                        response_type='Recipients',
4425                                        auth_settings=auth_settings,
4426                                        callback=params.get('callback'),
4427                                        _return_http_data_only=params.get('_return_http_data_only'),
4428                                        _preload_content=params.get('_preload_content', True),
4429                                        _request_timeout=params.get('_request_timeout'),
4430                                        collection_formats=collection_formats)
4431
4432    def list_tabs(self, account_id, recipient_id, template_id, **kwargs):
4433        """
4434        Gets the tabs information for a signer or sign-in-person recipient in a template.
4435        Gets the tabs information for a signer or sign-in-person recipient in a template.
4436        This method makes a synchronous HTTP request by default. To make an
4437        asynchronous HTTP request, please define a `callback` function
4438        to be invoked when receiving the response.
4439        >>> def callback_function(response):
4440        >>>     pprint(response)
4441        >>>
4442        >>> thread = api.list_tabs(account_id, recipient_id, template_id, callback=callback_function)
4443
4444        :param callback function: The callback function
4445            for asynchronous request. (optional)
4446        :param str account_id: The external account number (int) or account ID Guid. (required)
4447        :param str recipient_id: The ID of the recipient being accessed. (required)
4448        :param str template_id: The ID of the template being accessed. (required)
4449        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4450        :param str include_metadata:
4451        :return: Tabs
4452                 If the method is called asynchronously,
4453                 returns the request thread.
4454        """
4455        kwargs['_return_http_data_only'] = True
4456        if kwargs.get('callback'):
4457            return self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4458        else:
4459            (data) = self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4460            return data
4461
4462    def list_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
4463        """
4464        Gets the tabs information for a signer or sign-in-person recipient in a template.
4465        Gets the tabs information for a signer or sign-in-person recipient in a template.
4466        This method makes a synchronous HTTP request by default. To make an
4467        asynchronous HTTP request, please define a `callback` function
4468        to be invoked when receiving the response.
4469        >>> def callback_function(response):
4470        >>>     pprint(response)
4471        >>>
4472        >>> thread = api.list_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
4473
4474        :param callback function: The callback function
4475            for asynchronous request. (optional)
4476        :param str account_id: The external account number (int) or account ID Guid. (required)
4477        :param str recipient_id: The ID of the recipient being accessed. (required)
4478        :param str template_id: The ID of the template being accessed. (required)
4479        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4480        :param str include_metadata:
4481        :return: Tabs
4482                 If the method is called asynchronously,
4483                 returns the request thread.
4484        """
4485
4486        all_params = ['account_id', 'recipient_id', 'template_id', 'include_anchor_tab_locations', 'include_metadata']
4487        all_params.append('callback')
4488        all_params.append('_return_http_data_only')
4489        all_params.append('_preload_content')
4490        all_params.append('_request_timeout')
4491
4492        params = locals()
4493        for key, val in iteritems(params['kwargs']):
4494            if key not in all_params:
4495                raise TypeError(
4496                    "Got an unexpected keyword argument '%s'"
4497                    " to method list_tabs" % key
4498                )
4499            params[key] = val
4500        del params['kwargs']
4501        # verify the required parameter 'account_id' is set
4502        if ('account_id' not in params) or (params['account_id'] is None):
4503            raise ValueError("Missing the required parameter `account_id` when calling `list_tabs`")
4504        # verify the required parameter 'recipient_id' is set
4505        if ('recipient_id' not in params) or (params['recipient_id'] is None):
4506            raise ValueError("Missing the required parameter `recipient_id` when calling `list_tabs`")
4507        # verify the required parameter 'template_id' is set
4508        if ('template_id' not in params) or (params['template_id'] is None):
4509            raise ValueError("Missing the required parameter `template_id` when calling `list_tabs`")
4510
4511
4512        collection_formats = {}
4513
4514        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
4515        path_params = {}
4516        if 'account_id' in params:
4517            path_params['accountId'] = params['account_id']
4518        if 'recipient_id' in params:
4519            path_params['recipientId'] = params['recipient_id']
4520        if 'template_id' in params:
4521            path_params['templateId'] = params['template_id']
4522
4523        query_params = {}
4524        if 'include_anchor_tab_locations' in params:
4525            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4526        if 'include_metadata' in params:
4527            query_params['include_metadata'] = params['include_metadata']
4528
4529        header_params = {}
4530
4531        form_params = []
4532        local_var_files = {}
4533
4534        body_params = None
4535        # HTTP header `Accept`
4536        header_params['Accept'] = self.api_client.\
4537            select_header_accept(['application/json'])
4538
4539        # Authentication setting
4540        auth_settings = []
4541
4542        return self.api_client.call_api(resource_path, 'GET',
4543                                        path_params,
4544                                        query_params,
4545                                        header_params,
4546                                        body=body_params,
4547                                        post_params=form_params,
4548                                        files=local_var_files,
4549                                        response_type='Tabs',
4550                                        auth_settings=auth_settings,
4551                                        callback=params.get('callback'),
4552                                        _return_http_data_only=params.get('_return_http_data_only'),
4553                                        _preload_content=params.get('_preload_content', True),
4554                                        _request_timeout=params.get('_request_timeout'),
4555                                        collection_formats=collection_formats)
4556
4557    def list_templates(self, account_id, **kwargs):
4558        """
4559        Gets the definition of a template.
4560        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4561        This method makes a synchronous HTTP request by default. To make an
4562        asynchronous HTTP request, please define a `callback` function
4563        to be invoked when receiving the response.
4564        >>> def callback_function(response):
4565        >>>     pprint(response)
4566        >>>
4567        >>> thread = api.list_templates(account_id, callback=callback_function)
4568
4569        :param callback function: The callback function
4570            for asynchronous request. (optional)
4571        :param str account_id: The external account number (int) or account ID Guid. (required)
4572        :param str count: Number of records to return in the cache.
4573        :param str created_from_date:
4574        :param str created_to_date:
4575        :param str folder_ids: A comma separated list of folder ID GUIDs.
4576        :param str folder_types:
4577        :param str from_date: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
4578        :param str include: A comma separated list of additional template attributes to include in the response. Valid values are: recipients, folders, documents, custom_fields, and notifications.
4579        :param str is_deleted_template_only:
4580        :param str is_download:
4581        :param str modified_from_date:
4582        :param str modified_to_date:
4583        :param str order: Sets the direction order used to sort the list. Valid values are: -asc = ascending sort order (a to z)  -desc = descending sort order (z to a)
4584        :param str order_by: Sets the file attribute used to sort the list. Valid values are:  -name: template name  -modified: date/time template was last modified.  -used: date/time the template was last used.
4585        :param str search_fields:
4586        :param str search_text: The search text used to search the names of templates.
4587        :param str shared_by_me: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
4588        :param str start_position: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
4589        :param str template_ids:
4590        :param str to_date: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
4591        :param str used_from_date: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
4592        :param str used_to_date: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
4593        :param str user_filter: Sets if the templates shown in the response Valid values are:  -owned_by_me: only shows templates the user owns.  -shared_with_me: only shows templates that are shared with the user.  -all: shows all templates owned or shared with the user.
4594        :param str user_id:
4595        :return: EnvelopeTemplateResults
4596                 If the method is called asynchronously,
4597                 returns the request thread.
4598        """
4599        kwargs['_return_http_data_only'] = True
4600        if kwargs.get('callback'):
4601            return self.list_templates_with_http_info(account_id, **kwargs)
4602        else:
4603            (data) = self.list_templates_with_http_info(account_id, **kwargs)
4604            return data
4605
4606    def list_templates_with_http_info(self, account_id, **kwargs):
4607        """
4608        Gets the definition of a template.
4609        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4610        This method makes a synchronous HTTP request by default. To make an
4611        asynchronous HTTP request, please define a `callback` function
4612        to be invoked when receiving the response.
4613        >>> def callback_function(response):
4614        >>>     pprint(response)
4615        >>>
4616        >>> thread = api.list_templates_with_http_info(account_id, callback=callback_function)
4617
4618        :param callback function: The callback function
4619            for asynchronous request. (optional)
4620        :param str account_id: The external account number (int) or account ID Guid. (required)
4621        :param str count: Number of records to return in the cache.
4622        :param str created_from_date:
4623        :param str created_to_date:
4624        :param str folder_ids: A comma separated list of folder ID GUIDs.
4625        :param str folder_types:
4626        :param str from_date: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
4627        :param str include: A comma separated list of additional template attributes to include in the response. Valid values are: recipients, folders, documents, custom_fields, and notifications.
4628        :param str is_deleted_template_only:
4629        :param str is_download:
4630        :param str modified_from_date:
4631        :param str modified_to_date:
4632        :param str order: Sets the direction order used to sort the list. Valid values are: -asc = ascending sort order (a to z)  -desc = descending sort order (z to a)
4633        :param str order_by: Sets the file attribute used to sort the list. Valid values are:  -name: template name  -modified: date/time template was last modified.  -used: date/time the template was last used.
4634        :param str search_fields:
4635        :param str search_text: The search text used to search the names of templates.
4636        :param str shared_by_me: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
4637        :param str start_position: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
4638        :param str template_ids:
4639        :param str to_date: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
4640        :param str used_from_date: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
4641        :param str used_to_date: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
4642        :param str user_filter: Sets if the templates shown in the response Valid values are:  -owned_by_me: only shows templates the user owns.  -shared_with_me: only shows templates that are shared with the user.  -all: shows all templates owned or shared with the user.
4643        :param str user_id:
4644        :return: EnvelopeTemplateResults
4645                 If the method is called asynchronously,
4646                 returns the request thread.
4647        """
4648
4649        all_params = ['account_id', 'count', 'created_from_date', 'created_to_date', 'folder_ids', 'folder_types', 'from_date', 'include', 'is_deleted_template_only', 'is_download', 'modified_from_date', 'modified_to_date', 'order', 'order_by', 'search_fields', 'search_text', 'shared_by_me', 'start_position', 'template_ids', 'to_date', 'used_from_date', 'used_to_date', 'user_filter', 'user_id']
4650        all_params.append('callback')
4651        all_params.append('_return_http_data_only')
4652        all_params.append('_preload_content')
4653        all_params.append('_request_timeout')
4654
4655        params = locals()
4656        for key, val in iteritems(params['kwargs']):
4657            if key not in all_params:
4658                raise TypeError(
4659                    "Got an unexpected keyword argument '%s'"
4660                    " to method list_templates" % key
4661                )
4662            params[key] = val
4663        del params['kwargs']
4664        # verify the required parameter 'account_id' is set
4665        if ('account_id' not in params) or (params['account_id'] is None):
4666            raise ValueError("Missing the required parameter `account_id` when calling `list_templates`")
4667
4668
4669        collection_formats = {}
4670
4671        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
4672        path_params = {}
4673        if 'account_id' in params:
4674            path_params['accountId'] = params['account_id']
4675
4676        query_params = {}
4677        if 'count' in params:
4678            query_params['count'] = params['count']
4679        if 'created_from_date' in params:
4680            query_params['created_from_date'] = params['created_from_date']
4681        if 'created_to_date' in params:
4682            query_params['created_to_date'] = params['created_to_date']
4683        if 'folder_ids' in params:
4684            query_params['folder_ids'] = params['folder_ids']
4685        if 'folder_types' in params:
4686            query_params['folder_types'] = params['folder_types']
4687        if 'from_date' in params:
4688            query_params['from_date'] = params['from_date']
4689        if 'include' in params:
4690            query_params['include'] = params['include']
4691        if 'is_deleted_template_only' in params:
4692            query_params['is_deleted_template_only'] = params['is_deleted_template_only']
4693        if 'is_download' in params:
4694            query_params['is_download'] = params['is_download']
4695        if 'modified_from_date' in params:
4696            query_params['modified_from_date'] = params['modified_from_date']
4697        if 'modified_to_date' in params:
4698            query_params['modified_to_date'] = params['modified_to_date']
4699        if 'order' in params:
4700            query_params['order'] = params['order']
4701        if 'order_by' in params:
4702            query_params['order_by'] = params['order_by']
4703        if 'search_fields' in params:
4704            query_params['search_fields'] = params['search_fields']
4705        if 'search_text' in params:
4706            query_params['search_text'] = params['search_text']
4707        if 'shared_by_me' in params:
4708            query_params['shared_by_me'] = params['shared_by_me']
4709        if 'start_position' in params:
4710            query_params['start_position'] = params['start_position']
4711        if 'template_ids' in params:
4712            query_params['template_ids'] = params['template_ids']
4713        if 'to_date' in params:
4714            query_params['to_date'] = params['to_date']
4715        if 'used_from_date' in params:
4716            query_params['used_from_date'] = params['used_from_date']
4717        if 'used_to_date' in params:
4718            query_params['used_to_date'] = params['used_to_date']
4719        if 'user_filter' in params:
4720            query_params['user_filter'] = params['user_filter']
4721        if 'user_id' in params:
4722            query_params['user_id'] = params['user_id']
4723
4724        header_params = {}
4725
4726        form_params = []
4727        local_var_files = {}
4728
4729        body_params = None
4730        # HTTP header `Accept`
4731        header_params['Accept'] = self.api_client.\
4732            select_header_accept(['application/json'])
4733
4734        # Authentication setting
4735        auth_settings = []
4736
4737        return self.api_client.call_api(resource_path, 'GET',
4738                                        path_params,
4739                                        query_params,
4740                                        header_params,
4741                                        body=body_params,
4742                                        post_params=form_params,
4743                                        files=local_var_files,
4744                                        response_type='EnvelopeTemplateResults',
4745                                        auth_settings=auth_settings,
4746                                        callback=params.get('callback'),
4747                                        _return_http_data_only=params.get('_return_http_data_only'),
4748                                        _preload_content=params.get('_preload_content', True),
4749                                        _request_timeout=params.get('_request_timeout'),
4750                                        collection_formats=collection_formats)
4751
4752    def rotate_document_page(self, account_id, document_id, page_number, template_id, **kwargs):
4753        """
4754        Rotates page image from a template for display.
4755        Rotates page image from a template for display. The page image can be rotated to the left or right.
4756        This method makes a synchronous HTTP request by default. To make an
4757        asynchronous HTTP request, please define a `callback` function
4758        to be invoked when receiving the response.
4759        >>> def callback_function(response):
4760        >>>     pprint(response)
4761        >>>
4762        >>> thread = api.rotate_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
4763
4764        :param callback function: The callback function
4765            for asynchronous request. (optional)
4766        :param str account_id: The external account number (int) or account ID Guid. (required)
4767        :param str document_id: The ID of the document being accessed. (required)
4768        :param str page_number: The page number being accessed. (required)
4769        :param str template_id: The ID of the template being accessed. (required)
4770        :param PageRequest page_request:
4771        :return: None
4772                 If the method is called asynchronously,
4773                 returns the request thread.
4774        """
4775        kwargs['_return_http_data_only'] = True
4776        if kwargs.get('callback'):
4777            return self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4778        else:
4779            (data) = self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4780            return data
4781
4782    def rotate_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
4783        """
4784        Rotates page image from a template for display.
4785        Rotates page image from a template for display. The page image can be rotated to the left or right.
4786        This method makes a synchronous HTTP request by default. To make an
4787        asynchronous HTTP request, please define a `callback` function
4788        to be invoked when receiving the response.
4789        >>> def callback_function(response):
4790        >>>     pprint(response)
4791        >>>
4792        >>> thread = api.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
4793
4794        :param callback function: The callback function
4795            for asynchronous request. (optional)
4796        :param str account_id: The external account number (int) or account ID Guid. (required)
4797        :param str document_id: The ID of the document being accessed. (required)
4798        :param str page_number: The page number being accessed. (required)
4799        :param str template_id: The ID of the template being accessed. (required)
4800        :param PageRequest page_request:
4801        :return: None
4802                 If the method is called asynchronously,
4803                 returns the request thread.
4804        """
4805
4806        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request']
4807        all_params.append('callback')
4808        all_params.append('_return_http_data_only')
4809        all_params.append('_preload_content')
4810        all_params.append('_request_timeout')
4811
4812        params = locals()
4813        for key, val in iteritems(params['kwargs']):
4814            if key not in all_params:
4815                raise TypeError(
4816                    "Got an unexpected keyword argument '%s'"
4817                    " to method rotate_document_page" % key
4818                )
4819            params[key] = val
4820        del params['kwargs']
4821        # verify the required parameter 'account_id' is set
4822        if ('account_id' not in params) or (params['account_id'] is None):
4823            raise ValueError("Missing the required parameter `account_id` when calling `rotate_document_page`")
4824        # verify the required parameter 'document_id' is set
4825        if ('document_id' not in params) or (params['document_id'] is None):
4826            raise ValueError("Missing the required parameter `document_id` when calling `rotate_document_page`")
4827        # verify the required parameter 'page_number' is set
4828        if ('page_number' not in params) or (params['page_number'] is None):
4829            raise ValueError("Missing the required parameter `page_number` when calling `rotate_document_page`")
4830        # verify the required parameter 'template_id' is set
4831        if ('template_id' not in params) or (params['template_id'] is None):
4832            raise ValueError("Missing the required parameter `template_id` when calling `rotate_document_page`")
4833
4834
4835        collection_formats = {}
4836
4837        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
4838        path_params = {}
4839        if 'account_id' in params:
4840            path_params['accountId'] = params['account_id']
4841        if 'document_id' in params:
4842            path_params['documentId'] = params['document_id']
4843        if 'page_number' in params:
4844            path_params['pageNumber'] = params['page_number']
4845        if 'template_id' in params:
4846            path_params['templateId'] = params['template_id']
4847
4848        query_params = {}
4849
4850        header_params = {}
4851
4852        form_params = []
4853        local_var_files = {}
4854
4855        body_params = None
4856        if 'page_request' in params:
4857            body_params = params['page_request']
4858        # HTTP header `Accept`
4859        header_params['Accept'] = self.api_client.\
4860            select_header_accept(['application/json'])
4861
4862        # Authentication setting
4863        auth_settings = []
4864
4865        return self.api_client.call_api(resource_path, 'PUT',
4866                                        path_params,
4867                                        query_params,
4868                                        header_params,
4869                                        body=body_params,
4870                                        post_params=form_params,
4871                                        files=local_var_files,
4872                                        response_type=None,
4873                                        auth_settings=auth_settings,
4874                                        callback=params.get('callback'),
4875                                        _return_http_data_only=params.get('_return_http_data_only'),
4876                                        _preload_content=params.get('_preload_content', True),
4877                                        _request_timeout=params.get('_request_timeout'),
4878                                        collection_formats=collection_formats)
4879
4880    def update(self, account_id, template_id, **kwargs):
4881        """
4882        Updates an existing template.
4883        Updates an existing template.
4884        This method makes a synchronous HTTP request by default. To make an
4885        asynchronous HTTP request, please define a `callback` function
4886        to be invoked when receiving the response.
4887        >>> def callback_function(response):
4888        >>>     pprint(response)
4889        >>>
4890        >>> thread = api.update(account_id, template_id, callback=callback_function)
4891
4892        :param callback function: The callback function
4893            for asynchronous request. (optional)
4894        :param str account_id: The external account number (int) or account ID Guid. (required)
4895        :param str template_id: The ID of the template being accessed. (required)
4896        :param EnvelopeTemplate envelope_template:
4897        :return: TemplateUpdateSummary
4898                 If the method is called asynchronously,
4899                 returns the request thread.
4900        """
4901        kwargs['_return_http_data_only'] = True
4902        if kwargs.get('callback'):
4903            return self.update_with_http_info(account_id, template_id, **kwargs)
4904        else:
4905            (data) = self.update_with_http_info(account_id, template_id, **kwargs)
4906            return data
4907
4908    def update_with_http_info(self, account_id, template_id, **kwargs):
4909        """
4910        Updates an existing template.
4911        Updates an existing template.
4912        This method makes a synchronous HTTP request by default. To make an
4913        asynchronous HTTP request, please define a `callback` function
4914        to be invoked when receiving the response.
4915        >>> def callback_function(response):
4916        >>>     pprint(response)
4917        >>>
4918        >>> thread = api.update_with_http_info(account_id, template_id, callback=callback_function)
4919
4920        :param callback function: The callback function
4921            for asynchronous request. (optional)
4922        :param str account_id: The external account number (int) or account ID Guid. (required)
4923        :param str template_id: The ID of the template being accessed. (required)
4924        :param EnvelopeTemplate envelope_template:
4925        :return: TemplateUpdateSummary
4926                 If the method is called asynchronously,
4927                 returns the request thread.
4928        """
4929
4930        all_params = ['account_id', 'template_id', 'envelope_template']
4931        all_params.append('callback')
4932        all_params.append('_return_http_data_only')
4933        all_params.append('_preload_content')
4934        all_params.append('_request_timeout')
4935
4936        params = locals()
4937        for key, val in iteritems(params['kwargs']):
4938            if key not in all_params:
4939                raise TypeError(
4940                    "Got an unexpected keyword argument '%s'"
4941                    " to method update" % key
4942                )
4943            params[key] = val
4944        del params['kwargs']
4945        # verify the required parameter 'account_id' is set
4946        if ('account_id' not in params) or (params['account_id'] is None):
4947            raise ValueError("Missing the required parameter `account_id` when calling `update`")
4948        # verify the required parameter 'template_id' is set
4949        if ('template_id' not in params) or (params['template_id'] is None):
4950            raise ValueError("Missing the required parameter `template_id` when calling `update`")
4951
4952
4953        collection_formats = {}
4954
4955        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json')
4956        path_params = {}
4957        if 'account_id' in params:
4958            path_params['accountId'] = params['account_id']
4959        if 'template_id' in params:
4960            path_params['templateId'] = params['template_id']
4961
4962        query_params = {}
4963
4964        header_params = {}
4965
4966        form_params = []
4967        local_var_files = {}
4968
4969        body_params = None
4970        if 'envelope_template' in params:
4971            body_params = params['envelope_template']
4972        # HTTP header `Accept`
4973        header_params['Accept'] = self.api_client.\
4974            select_header_accept(['application/json'])
4975
4976        # Authentication setting
4977        auth_settings = []
4978
4979        return self.api_client.call_api(resource_path, 'PUT',
4980                                        path_params,
4981                                        query_params,
4982                                        header_params,
4983                                        body=body_params,
4984                                        post_params=form_params,
4985                                        files=local_var_files,
4986                                        response_type='TemplateUpdateSummary',
4987                                        auth_settings=auth_settings,
4988                                        callback=params.get('callback'),
4989                                        _return_http_data_only=params.get('_return_http_data_only'),
4990                                        _preload_content=params.get('_preload_content', True),
4991                                        _request_timeout=params.get('_request_timeout'),
4992                                        collection_formats=collection_formats)
4993
4994    def update_custom_fields(self, account_id, template_id, **kwargs):
4995        """
4996        Updates envelope custom fields in a template.
4997        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
4998        This method makes a synchronous HTTP request by default. To make an
4999        asynchronous HTTP request, please define a `callback` function
5000        to be invoked when receiving the response.
5001        >>> def callback_function(response):
5002        >>>     pprint(response)
5003        >>>
5004        >>> thread = api.update_custom_fields(account_id, template_id, callback=callback_function)
5005
5006        :param callback function: The callback function
5007            for asynchronous request. (optional)
5008        :param str account_id: The external account number (int) or account ID Guid. (required)
5009        :param str template_id: The ID of the template being accessed. (required)
5010        :param TemplateCustomFields template_custom_fields:
5011        :return: CustomFields
5012                 If the method is called asynchronously,
5013                 returns the request thread.
5014        """
5015        kwargs['_return_http_data_only'] = True
5016        if kwargs.get('callback'):
5017            return self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
5018        else:
5019            (data) = self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
5020            return data
5021
5022    def update_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
5023        """
5024        Updates envelope custom fields in a template.
5025        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
5026        This method makes a synchronous HTTP request by default. To make an
5027        asynchronous HTTP request, please define a `callback` function
5028        to be invoked when receiving the response.
5029        >>> def callback_function(response):
5030        >>>     pprint(response)
5031        >>>
5032        >>> thread = api.update_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
5033
5034        :param callback function: The callback function
5035            for asynchronous request. (optional)
5036        :param str account_id: The external account number (int) or account ID Guid. (required)
5037        :param str template_id: The ID of the template being accessed. (required)
5038        :param TemplateCustomFields template_custom_fields:
5039        :return: CustomFields
5040                 If the method is called asynchronously,
5041                 returns the request thread.
5042        """
5043
5044        all_params = ['account_id', 'template_id', 'template_custom_fields']
5045        all_params.append('callback')
5046        all_params.append('_return_http_data_only')
5047        all_params.append('_preload_content')
5048        all_params.append('_request_timeout')
5049
5050        params = locals()
5051        for key, val in iteritems(params['kwargs']):
5052            if key not in all_params:
5053                raise TypeError(
5054                    "Got an unexpected keyword argument '%s'"
5055                    " to method update_custom_fields" % key
5056                )
5057            params[key] = val
5058        del params['kwargs']
5059        # verify the required parameter 'account_id' is set
5060        if ('account_id' not in params) or (params['account_id'] is None):
5061            raise ValueError("Missing the required parameter `account_id` when calling `update_custom_fields`")
5062        # verify the required parameter 'template_id' is set
5063        if ('template_id' not in params) or (params['template_id'] is None):
5064            raise ValueError("Missing the required parameter `template_id` when calling `update_custom_fields`")
5065
5066
5067        collection_formats = {}
5068
5069        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
5070        path_params = {}
5071        if 'account_id' in params:
5072            path_params['accountId'] = params['account_id']
5073        if 'template_id' in params:
5074            path_params['templateId'] = params['template_id']
5075
5076        query_params = {}
5077
5078        header_params = {}
5079
5080        form_params = []
5081        local_var_files = {}
5082
5083        body_params = None
5084        if 'template_custom_fields' in params:
5085            body_params = params['template_custom_fields']
5086        # HTTP header `Accept`
5087        header_params['Accept'] = self.api_client.\
5088            select_header_accept(['application/json'])
5089
5090        # Authentication setting
5091        auth_settings = []
5092
5093        return self.api_client.call_api(resource_path, 'PUT',
5094                                        path_params,
5095                                        query_params,
5096                                        header_params,
5097                                        body=body_params,
5098                                        post_params=form_params,
5099                                        files=local_var_files,
5100                                        response_type='CustomFields',
5101                                        auth_settings=auth_settings,
5102                                        callback=params.get('callback'),
5103                                        _return_http_data_only=params.get('_return_http_data_only'),
5104                                        _preload_content=params.get('_preload_content', True),
5105                                        _request_timeout=params.get('_request_timeout'),
5106                                        collection_formats=collection_formats)
5107
5108    def update_document(self, account_id, document_id, template_id, **kwargs):
5109        """
5110        Adds a document to a template document.
5111        Adds the specified document to an existing template document.
5112        This method makes a synchronous HTTP request by default. To make an
5113        asynchronous HTTP request, please define a `callback` function
5114        to be invoked when receiving the response.
5115        >>> def callback_function(response):
5116        >>>     pprint(response)
5117        >>>
5118        >>> thread = api.update_document(account_id, document_id, template_id, callback=callback_function)
5119
5120        :param callback function: The callback function
5121            for asynchronous request. (optional)
5122        :param str account_id: The external account number (int) or account ID Guid. (required)
5123        :param str document_id: The ID of the document being accessed. (required)
5124        :param str template_id: The ID of the template being accessed. (required)
5125        :param str is_envelope_definition:
5126        :param EnvelopeDefinition envelope_definition:
5127        :return: EnvelopeDocument
5128                 If the method is called asynchronously,
5129                 returns the request thread.
5130        """
5131        kwargs['_return_http_data_only'] = True
5132        if kwargs.get('callback'):
5133            return self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
5134        else:
5135            (data) = self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
5136            return data
5137
5138    def update_document_with_http_info(self, account_id, document_id, template_id, **kwargs):
5139        """
5140        Adds a document to a template document.
5141        Adds the specified document to an existing template document.
5142        This method makes a synchronous HTTP request by default. To make an
5143        asynchronous HTTP request, please define a `callback` function
5144        to be invoked when receiving the response.
5145        >>> def callback_function(response):
5146        >>>     pprint(response)
5147        >>>
5148        >>> thread = api.update_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
5149
5150        :param callback function: The callback function
5151            for asynchronous request. (optional)
5152        :param str account_id: The external account number (int) or account ID Guid. (required)
5153        :param str document_id: The ID of the document being accessed. (required)
5154        :param str template_id: The ID of the template being accessed. (required)
5155        :param str is_envelope_definition:
5156        :param EnvelopeDefinition envelope_definition:
5157        :return: EnvelopeDocument
5158                 If the method is called asynchronously,
5159                 returns the request thread.
5160        """
5161
5162        all_params = ['account_id', 'document_id', 'template_id', 'is_envelope_definition', 'envelope_definition']
5163        all_params.append('callback')
5164        all_params.append('_return_http_data_only')
5165        all_params.append('_preload_content')
5166        all_params.append('_request_timeout')
5167
5168        params = locals()
5169        for key, val in iteritems(params['kwargs']):
5170            if key not in all_params:
5171                raise TypeError(
5172                    "Got an unexpected keyword argument '%s'"
5173                    " to method update_document" % key
5174                )
5175            params[key] = val
5176        del params['kwargs']
5177        # verify the required parameter 'account_id' is set
5178        if ('account_id' not in params) or (params['account_id'] is None):
5179            raise ValueError("Missing the required parameter `account_id` when calling `update_document`")
5180        # verify the required parameter 'document_id' is set
5181        if ('document_id' not in params) or (params['document_id'] is None):
5182            raise ValueError("Missing the required parameter `document_id` when calling `update_document`")
5183        # verify the required parameter 'template_id' is set
5184        if ('template_id' not in params) or (params['template_id'] is None):
5185            raise ValueError("Missing the required parameter `template_id` when calling `update_document`")
5186
5187
5188        collection_formats = {}
5189
5190        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
5191        path_params = {}
5192        if 'account_id' in params:
5193            path_params['accountId'] = params['account_id']
5194        if 'document_id' in params:
5195            path_params['documentId'] = params['document_id']
5196        if 'template_id' in params:
5197            path_params['templateId'] = params['template_id']
5198
5199        query_params = {}
5200        if 'is_envelope_definition' in params:
5201            query_params['is_envelope_definition'] = params['is_envelope_definition']
5202
5203        header_params = {}
5204
5205        form_params = []
5206        local_var_files = {}
5207
5208        body_params = None
5209        if 'envelope_definition' in params:
5210            body_params = params['envelope_definition']
5211        # HTTP header `Accept`
5212        header_params['Accept'] = self.api_client.\
5213            select_header_accept(['application/json'])
5214
5215        # Authentication setting
5216        auth_settings = []
5217
5218        return self.api_client.call_api(resource_path, 'PUT',
5219                                        path_params,
5220                                        query_params,
5221                                        header_params,
5222                                        body=body_params,
5223                                        post_params=form_params,
5224                                        files=local_var_files,
5225                                        response_type='EnvelopeDocument',
5226                                        auth_settings=auth_settings,
5227                                        callback=params.get('callback'),
5228                                        _return_http_data_only=params.get('_return_http_data_only'),
5229                                        _preload_content=params.get('_preload_content', True),
5230                                        _request_timeout=params.get('_request_timeout'),
5231                                        collection_formats=collection_formats)
5232
5233    def update_document_fields(self, account_id, document_id, template_id, **kwargs):
5234        """
5235        Updates existing custom document fields in an existing template document.
5236        Updates existing custom document fields in an existing template document.
5237        This method makes a synchronous HTTP request by default. To make an
5238        asynchronous HTTP request, please define a `callback` function
5239        to be invoked when receiving the response.
5240        >>> def callback_function(response):
5241        >>>     pprint(response)
5242        >>>
5243        >>> thread = api.update_document_fields(account_id, document_id, template_id, callback=callback_function)
5244
5245        :param callback function: The callback function
5246            for asynchronous request. (optional)
5247        :param str account_id: The external account number (int) or account ID Guid. (required)
5248        :param str document_id: The ID of the document being accessed. (required)
5249        :param str template_id: The ID of the template being accessed. (required)
5250        :param DocumentFieldsInformation document_fields_information:
5251        :return: DocumentFieldsInformation
5252                 If the method is called asynchronously,
5253                 returns the request thread.
5254        """
5255        kwargs['_return_http_data_only'] = True
5256        if kwargs.get('callback'):
5257            return self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5258        else:
5259            (data) = self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5260            return data
5261
5262    def update_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
5263        """
5264        Updates existing custom document fields in an existing template document.
5265        Updates existing custom document fields in an existing template document.
5266        This method makes a synchronous HTTP request by default. To make an
5267        asynchronous HTTP request, please define a `callback` function
5268        to be invoked when receiving the response.
5269        >>> def callback_function(response):
5270        >>>     pprint(response)
5271        >>>
5272        >>> thread = api.update_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
5273
5274        :param callback function: The callback function
5275            for asynchronous request. (optional)
5276        :param str account_id: The external account number (int) or account ID Guid. (required)
5277        :param str document_id: The ID of the document being accessed. (required)
5278        :param str template_id: The ID of the template being accessed. (required)
5279        :param DocumentFieldsInformation document_fields_information:
5280        :return: DocumentFieldsInformation
5281                 If the method is called asynchronously,
5282                 returns the request thread.
5283        """
5284
5285        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
5286        all_params.append('callback')
5287        all_params.append('_return_http_data_only')
5288        all_params.append('_preload_content')
5289        all_params.append('_request_timeout')
5290
5291        params = locals()
5292        for key, val in iteritems(params['kwargs']):
5293            if key not in all_params:
5294                raise TypeError(
5295                    "Got an unexpected keyword argument '%s'"
5296                    " to method update_document_fields" % key
5297                )
5298            params[key] = val
5299        del params['kwargs']
5300        # verify the required parameter 'account_id' is set
5301        if ('account_id' not in params) or (params['account_id'] is None):
5302            raise ValueError("Missing the required parameter `account_id` when calling `update_document_fields`")
5303        # verify the required parameter 'document_id' is set
5304        if ('document_id' not in params) or (params['document_id'] is None):
5305            raise ValueError("Missing the required parameter `document_id` when calling `update_document_fields`")
5306        # verify the required parameter 'template_id' is set
5307        if ('template_id' not in params) or (params['template_id'] is None):
5308            raise ValueError("Missing the required parameter `template_id` when calling `update_document_fields`")
5309
5310
5311        collection_formats = {}
5312
5313        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
5314        path_params = {}
5315        if 'account_id' in params:
5316            path_params['accountId'] = params['account_id']
5317        if 'document_id' in params:
5318            path_params['documentId'] = params['document_id']
5319        if 'template_id' in params:
5320            path_params['templateId'] = params['template_id']
5321
5322        query_params = {}
5323
5324        header_params = {}
5325
5326        form_params = []
5327        local_var_files = {}
5328
5329        body_params = None
5330        if 'document_fields_information' in params:
5331            body_params = params['document_fields_information']
5332        # HTTP header `Accept`
5333        header_params['Accept'] = self.api_client.\
5334            select_header_accept(['application/json'])
5335
5336        # Authentication setting
5337        auth_settings = []
5338
5339        return self.api_client.call_api(resource_path, 'PUT',
5340                                        path_params,
5341                                        query_params,
5342                                        header_params,
5343                                        body=body_params,
5344                                        post_params=form_params,
5345                                        files=local_var_files,
5346                                        response_type='DocumentFieldsInformation',
5347                                        auth_settings=auth_settings,
5348                                        callback=params.get('callback'),
5349                                        _return_http_data_only=params.get('_return_http_data_only'),
5350                                        _preload_content=params.get('_preload_content', True),
5351                                        _request_timeout=params.get('_request_timeout'),
5352                                        collection_formats=collection_formats)
5353
5354    def update_documents(self, account_id, template_id, **kwargs):
5355        """
5356        Adds documents to a template document.
5357        Adds one or more documents to an existing template document.
5358        This method makes a synchronous HTTP request by default. To make an
5359        asynchronous HTTP request, please define a `callback` function
5360        to be invoked when receiving the response.
5361        >>> def callback_function(response):
5362        >>>     pprint(response)
5363        >>>
5364        >>> thread = api.update_documents(account_id, template_id, callback=callback_function)
5365
5366        :param callback function: The callback function
5367            for asynchronous request. (optional)
5368        :param str account_id: The external account number (int) or account ID Guid. (required)
5369        :param str template_id: The ID of the template being accessed. (required)
5370        :param EnvelopeDefinition envelope_definition:
5371        :return: TemplateDocumentsResult
5372                 If the method is called asynchronously,
5373                 returns the request thread.
5374        """
5375        kwargs['_return_http_data_only'] = True
5376        if kwargs.get('callback'):
5377            return self.update_documents_with_http_info(account_id, template_id, **kwargs)
5378        else:
5379            (data) = self.update_documents_with_http_info(account_id, template_id, **kwargs)
5380            return data
5381
5382    def update_documents_with_http_info(self, account_id, template_id, **kwargs):
5383        """
5384        Adds documents to a template document.
5385        Adds one or more documents to an existing template document.
5386        This method makes a synchronous HTTP request by default. To make an
5387        asynchronous HTTP request, please define a `callback` function
5388        to be invoked when receiving the response.
5389        >>> def callback_function(response):
5390        >>>     pprint(response)
5391        >>>
5392        >>> thread = api.update_documents_with_http_info(account_id, template_id, callback=callback_function)
5393
5394        :param callback function: The callback function
5395            for asynchronous request. (optional)
5396        :param str account_id: The external account number (int) or account ID Guid. (required)
5397        :param str template_id: The ID of the template being accessed. (required)
5398        :param EnvelopeDefinition envelope_definition:
5399        :return: TemplateDocumentsResult
5400                 If the method is called asynchronously,
5401                 returns the request thread.
5402        """
5403
5404        all_params = ['account_id', 'template_id', 'envelope_definition']
5405        all_params.append('callback')
5406        all_params.append('_return_http_data_only')
5407        all_params.append('_preload_content')
5408        all_params.append('_request_timeout')
5409
5410        params = locals()
5411        for key, val in iteritems(params['kwargs']):
5412            if key not in all_params:
5413                raise TypeError(
5414                    "Got an unexpected keyword argument '%s'"
5415                    " to method update_documents" % key
5416                )
5417            params[key] = val
5418        del params['kwargs']
5419        # verify the required parameter 'account_id' is set
5420        if ('account_id' not in params) or (params['account_id'] is None):
5421            raise ValueError("Missing the required parameter `account_id` when calling `update_documents`")
5422        # verify the required parameter 'template_id' is set
5423        if ('template_id' not in params) or (params['template_id'] is None):
5424            raise ValueError("Missing the required parameter `template_id` when calling `update_documents`")
5425
5426
5427        collection_formats = {}
5428
5429        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
5430        path_params = {}
5431        if 'account_id' in params:
5432            path_params['accountId'] = params['account_id']
5433        if 'template_id' in params:
5434            path_params['templateId'] = params['template_id']
5435
5436        query_params = {}
5437
5438        header_params = {}
5439
5440        form_params = []
5441        local_var_files = {}
5442
5443        body_params = None
5444        if 'envelope_definition' in params:
5445            body_params = params['envelope_definition']
5446        # HTTP header `Accept`
5447        header_params['Accept'] = self.api_client.\
5448            select_header_accept(['application/json'])
5449
5450        # Authentication setting
5451        auth_settings = []
5452
5453        return self.api_client.call_api(resource_path, 'PUT',
5454                                        path_params,
5455                                        query_params,
5456                                        header_params,
5457                                        body=body_params,
5458                                        post_params=form_params,
5459                                        files=local_var_files,
5460                                        response_type='TemplateDocumentsResult',
5461                                        auth_settings=auth_settings,
5462                                        callback=params.get('callback'),
5463                                        _return_http_data_only=params.get('_return_http_data_only'),
5464                                        _preload_content=params.get('_preload_content', True),
5465                                        _request_timeout=params.get('_request_timeout'),
5466                                        collection_formats=collection_formats)
5467
5468    def update_group_share(self, account_id, template_id, template_part, **kwargs):
5469        """
5470        Shares a template with a group
5471        Shares a template with the specified members group.
5472        This method makes a synchronous HTTP request by default. To make an
5473        asynchronous HTTP request, please define a `callback` function
5474        to be invoked when receiving the response.
5475        >>> def callback_function(response):
5476        >>>     pprint(response)
5477        >>>
5478        >>> thread = api.update_group_share(account_id, template_id, template_part, callback=callback_function)
5479
5480        :param callback function: The callback function
5481            for asynchronous request. (optional)
5482        :param str account_id: The external account number (int) or account ID Guid. (required)
5483        :param str template_id: The ID of the template being accessed. (required)
5484        :param str template_part: Currently, the only defined part is **groups**. (required)
5485        :param GroupInformation group_information:
5486        :return: GroupInformation
5487                 If the method is called asynchronously,
5488                 returns the request thread.
5489        """
5490        kwargs['_return_http_data_only'] = True
5491        if kwargs.get('callback'):
5492            return self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5493        else:
5494            (data) = self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5495            return data
5496
5497    def update_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs):
5498        """
5499        Shares a template with a group
5500        Shares a template with the specified members group.
5501        This method makes a synchronous HTTP request by default. To make an
5502        asynchronous HTTP request, please define a `callback` function
5503        to be invoked when receiving the response.
5504        >>> def callback_function(response):
5505        >>>     pprint(response)
5506        >>>
5507        >>> thread = api.update_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
5508
5509        :param callback function: The callback function
5510            for asynchronous request. (optional)
5511        :param str account_id: The external account number (int) or account ID Guid. (required)
5512        :param str template_id: The ID of the template being accessed. (required)
5513        :param str template_part: Currently, the only defined part is **groups**. (required)
5514        :param GroupInformation group_information:
5515        :return: GroupInformation
5516                 If the method is called asynchronously,
5517                 returns the request thread.
5518        """
5519
5520        all_params = ['account_id', 'template_id', 'template_part', 'group_information']
5521        all_params.append('callback')
5522        all_params.append('_return_http_data_only')
5523        all_params.append('_preload_content')
5524        all_params.append('_request_timeout')
5525
5526        params = locals()
5527        for key, val in iteritems(params['kwargs']):
5528            if key not in all_params:
5529                raise TypeError(
5530                    "Got an unexpected keyword argument '%s'"
5531                    " to method update_group_share" % key
5532                )
5533            params[key] = val
5534        del params['kwargs']
5535        # verify the required parameter 'account_id' is set
5536        if ('account_id' not in params) or (params['account_id'] is None):
5537            raise ValueError("Missing the required parameter `account_id` when calling `update_group_share`")
5538        # verify the required parameter 'template_id' is set
5539        if ('template_id' not in params) or (params['template_id'] is None):
5540            raise ValueError("Missing the required parameter `template_id` when calling `update_group_share`")
5541        # verify the required parameter 'template_part' is set
5542        if ('template_part' not in params) or (params['template_part'] is None):
5543            raise ValueError("Missing the required parameter `template_part` when calling `update_group_share`")
5544
5545
5546        collection_formats = {}
5547
5548        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json')
5549        path_params = {}
5550        if 'account_id' in params:
5551            path_params['accountId'] = params['account_id']
5552        if 'template_id' in params:
5553            path_params['templateId'] = params['template_id']
5554        if 'template_part' in params:
5555            path_params['templatePart'] = params['template_part']
5556
5557        query_params = {}
5558
5559        header_params = {}
5560
5561        form_params = []
5562        local_var_files = {}
5563
5564        body_params = None
5565        if 'group_information' in params:
5566            body_params = params['group_information']
5567        # HTTP header `Accept`
5568        header_params['Accept'] = self.api_client.\
5569            select_header_accept(['application/json'])
5570
5571        # Authentication setting
5572        auth_settings = []
5573
5574        return self.api_client.call_api(resource_path, 'PUT',
5575                                        path_params,
5576                                        query_params,
5577                                        header_params,
5578                                        body=body_params,
5579                                        post_params=form_params,
5580                                        files=local_var_files,
5581                                        response_type='GroupInformation',
5582                                        auth_settings=auth_settings,
5583                                        callback=params.get('callback'),
5584                                        _return_http_data_only=params.get('_return_http_data_only'),
5585                                        _preload_content=params.get('_preload_content', True),
5586                                        _request_timeout=params.get('_request_timeout'),
5587                                        collection_formats=collection_formats)
5588
5589    def update_lock(self, account_id, template_id, **kwargs):
5590        """
5591        Updates a template lock.
5592        Updates the lock duration time or update the `lockedByApp` property information for the specified template. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated.
5593        This method makes a synchronous HTTP request by default. To make an
5594        asynchronous HTTP request, please define a `callback` function
5595        to be invoked when receiving the response.
5596        >>> def callback_function(response):
5597        >>>     pprint(response)
5598        >>>
5599        >>> thread = api.update_lock(account_id, template_id, callback=callback_function)
5600
5601        :param callback function: The callback function
5602            for asynchronous request. (optional)
5603        :param str account_id: The external account number (int) or account ID Guid. (required)
5604        :param str template_id: The ID of the template being accessed. (required)
5605        :param LockRequest lock_request:
5606        :return: LockInformation
5607                 If the method is called asynchronously,
5608                 returns the request thread.
5609        """
5610        kwargs['_return_http_data_only'] = True
5611        if kwargs.get('callback'):
5612            return self.update_lock_with_http_info(account_id, template_id, **kwargs)
5613        else:
5614            (data) = self.update_lock_with_http_info(account_id, template_id, **kwargs)
5615            return data
5616
5617    def update_lock_with_http_info(self, account_id, template_id, **kwargs):
5618        """
5619        Updates a template lock.
5620        Updates the lock duration time or update the `lockedByApp` property information for the specified template. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated.
5621        This method makes a synchronous HTTP request by default. To make an
5622        asynchronous HTTP request, please define a `callback` function
5623        to be invoked when receiving the response.
5624        >>> def callback_function(response):
5625        >>>     pprint(response)
5626        >>>
5627        >>> thread = api.update_lock_with_http_info(account_id, template_id, callback=callback_function)
5628
5629        :param callback function: The callback function
5630            for asynchronous request. (optional)
5631        :param str account_id: The external account number (int) or account ID Guid. (required)
5632        :param str template_id: The ID of the template being accessed. (required)
5633        :param LockRequest lock_request:
5634        :return: LockInformation
5635                 If the method is called asynchronously,
5636                 returns the request thread.
5637        """
5638
5639        all_params = ['account_id', 'template_id', 'lock_request']
5640        all_params.append('callback')
5641        all_params.append('_return_http_data_only')
5642        all_params.append('_preload_content')
5643        all_params.append('_request_timeout')
5644
5645        params = locals()
5646        for key, val in iteritems(params['kwargs']):
5647            if key not in all_params:
5648                raise TypeError(
5649                    "Got an unexpected keyword argument '%s'"
5650                    " to method update_lock" % key
5651                )
5652            params[key] = val
5653        del params['kwargs']
5654        # verify the required parameter 'account_id' is set
5655        if ('account_id' not in params) or (params['account_id'] is None):
5656            raise ValueError("Missing the required parameter `account_id` when calling `update_lock`")
5657        # verify the required parameter 'template_id' is set
5658        if ('template_id' not in params) or (params['template_id'] is None):
5659            raise ValueError("Missing the required parameter `template_id` when calling `update_lock`")
5660
5661
5662        collection_formats = {}
5663
5664        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
5665        path_params = {}
5666        if 'account_id' in params:
5667            path_params['accountId'] = params['account_id']
5668        if 'template_id' in params:
5669            path_params['templateId'] = params['template_id']
5670
5671        query_params = {}
5672
5673        header_params = {}
5674
5675        form_params = []
5676        local_var_files = {}
5677
5678        body_params = None
5679        if 'lock_request' in params:
5680            body_params = params['lock_request']
5681        # HTTP header `Accept`
5682        header_params['Accept'] = self.api_client.\
5683            select_header_accept(['application/json'])
5684
5685        # Authentication setting
5686        auth_settings = []
5687
5688        return self.api_client.call_api(resource_path, 'PUT',
5689                                        path_params,
5690                                        query_params,
5691                                        header_params,
5692                                        body=body_params,
5693                                        post_params=form_params,
5694                                        files=local_var_files,
5695                                        response_type='LockInformation',
5696                                        auth_settings=auth_settings,
5697                                        callback=params.get('callback'),
5698                                        _return_http_data_only=params.get('_return_http_data_only'),
5699                                        _preload_content=params.get('_preload_content', True),
5700                                        _request_timeout=params.get('_request_timeout'),
5701                                        collection_formats=collection_formats)
5702
5703    def update_notification_settings(self, account_id, template_id, **kwargs):
5704        """
5705        Updates the notification  structure for an existing template.
5706        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5707        This method makes a synchronous HTTP request by default. To make an
5708        asynchronous HTTP request, please define a `callback` function
5709        to be invoked when receiving the response.
5710        >>> def callback_function(response):
5711        >>>     pprint(response)
5712        >>>
5713        >>> thread = api.update_notification_settings(account_id, template_id, callback=callback_function)
5714
5715        :param callback function: The callback function
5716            for asynchronous request. (optional)
5717        :param str account_id: The external account number (int) or account ID Guid. (required)
5718        :param str template_id: The ID of the template being accessed. (required)
5719        :param TemplateNotificationRequest template_notification_request:
5720        :return: Notification
5721                 If the method is called asynchronously,
5722                 returns the request thread.
5723        """
5724        kwargs['_return_http_data_only'] = True
5725        if kwargs.get('callback'):
5726            return self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5727        else:
5728            (data) = self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5729            return data
5730
5731    def update_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
5732        """
5733        Updates the notification  structure for an existing template.
5734        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5735        This method makes a synchronous HTTP request by default. To make an
5736        asynchronous HTTP request, please define a `callback` function
5737        to be invoked when receiving the response.
5738        >>> def callback_function(response):
5739        >>>     pprint(response)
5740        >>>
5741        >>> thread = api.update_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
5742
5743        :param callback function: The callback function
5744            for asynchronous request. (optional)
5745        :param str account_id: The external account number (int) or account ID Guid. (required)
5746        :param str template_id: The ID of the template being accessed. (required)
5747        :param TemplateNotificationRequest template_notification_request:
5748        :return: Notification
5749                 If the method is called asynchronously,
5750                 returns the request thread.
5751        """
5752
5753        all_params = ['account_id', 'template_id', 'template_notification_request']
5754        all_params.append('callback')
5755        all_params.append('_return_http_data_only')
5756        all_params.append('_preload_content')
5757        all_params.append('_request_timeout')
5758
5759        params = locals()
5760        for key, val in iteritems(params['kwargs']):
5761            if key not in all_params:
5762                raise TypeError(
5763                    "Got an unexpected keyword argument '%s'"
5764                    " to method update_notification_settings" % key
5765                )
5766            params[key] = val
5767        del params['kwargs']
5768        # verify the required parameter 'account_id' is set
5769        if ('account_id' not in params) or (params['account_id'] is None):
5770            raise ValueError("Missing the required parameter `account_id` when calling `update_notification_settings`")
5771        # verify the required parameter 'template_id' is set
5772        if ('template_id' not in params) or (params['template_id'] is None):
5773            raise ValueError("Missing the required parameter `template_id` when calling `update_notification_settings`")
5774
5775
5776        collection_formats = {}
5777
5778        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
5779        path_params = {}
5780        if 'account_id' in params:
5781            path_params['accountId'] = params['account_id']
5782        if 'template_id' in params:
5783            path_params['templateId'] = params['template_id']
5784
5785        query_params = {}
5786
5787        header_params = {}
5788
5789        form_params = []
5790        local_var_files = {}
5791
5792        body_params = None
5793        if 'template_notification_request' in params:
5794            body_params = params['template_notification_request']
5795        # HTTP header `Accept`
5796        header_params['Accept'] = self.api_client.\
5797            select_header_accept(['application/json'])
5798
5799        # Authentication setting
5800        auth_settings = []
5801
5802        return self.api_client.call_api(resource_path, 'PUT',
5803                                        path_params,
5804                                        query_params,
5805                                        header_params,
5806                                        body=body_params,
5807                                        post_params=form_params,
5808                                        files=local_var_files,
5809                                        response_type='Notification',
5810                                        auth_settings=auth_settings,
5811                                        callback=params.get('callback'),
5812                                        _return_http_data_only=params.get('_return_http_data_only'),
5813                                        _preload_content=params.get('_preload_content', True),
5814                                        _request_timeout=params.get('_request_timeout'),
5815                                        collection_formats=collection_formats)
5816
5817    def update_recipients(self, account_id, template_id, **kwargs):
5818        """
5819        Updates recipients in a template.
5820        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5821        This method makes a synchronous HTTP request by default. To make an
5822        asynchronous HTTP request, please define a `callback` function
5823        to be invoked when receiving the response.
5824        >>> def callback_function(response):
5825        >>>     pprint(response)
5826        >>>
5827        >>> thread = api.update_recipients(account_id, template_id, callback=callback_function)
5828
5829        :param callback function: The callback function
5830            for asynchronous request. (optional)
5831        :param str account_id: The external account number (int) or account ID Guid. (required)
5832        :param str template_id: The ID of the template being accessed. (required)
5833        :param str resend_envelope:
5834        :param TemplateRecipients template_recipients:
5835        :return: RecipientsUpdateSummary
5836                 If the method is called asynchronously,
5837                 returns the request thread.
5838        """
5839        kwargs['_return_http_data_only'] = True
5840        if kwargs.get('callback'):
5841            return self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5842        else:
5843            (data) = self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5844            return data
5845
5846    def update_recipients_with_http_info(self, account_id, template_id, **kwargs):
5847        """
5848        Updates recipients in a template.
5849        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5850        This method makes a synchronous HTTP request by default. To make an
5851        asynchronous HTTP request, please define a `callback` function
5852        to be invoked when receiving the response.
5853        >>> def callback_function(response):
5854        >>>     pprint(response)
5855        >>>
5856        >>> thread = api.update_recipients_with_http_info(account_id, template_id, callback=callback_function)
5857
5858        :param callback function: The callback function
5859            for asynchronous request. (optional)
5860        :param str account_id: The external account number (int) or account ID Guid. (required)
5861        :param str template_id: The ID of the template being accessed. (required)
5862        :param str resend_envelope:
5863        :param TemplateRecipients template_recipients:
5864        :return: RecipientsUpdateSummary
5865                 If the method is called asynchronously,
5866                 returns the request thread.
5867        """
5868
5869        all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients']
5870        all_params.append('callback')
5871        all_params.append('_return_http_data_only')
5872        all_params.append('_preload_content')
5873        all_params.append('_request_timeout')
5874
5875        params = locals()
5876        for key, val in iteritems(params['kwargs']):
5877            if key not in all_params:
5878                raise TypeError(
5879                    "Got an unexpected keyword argument '%s'"
5880                    " to method update_recipients" % key
5881                )
5882            params[key] = val
5883        del params['kwargs']
5884        # verify the required parameter 'account_id' is set
5885        if ('account_id' not in params) or (params['account_id'] is None):
5886            raise ValueError("Missing the required parameter `account_id` when calling `update_recipients`")
5887        # verify the required parameter 'template_id' is set
5888        if ('template_id' not in params) or (params['template_id'] is None):
5889            raise ValueError("Missing the required parameter `template_id` when calling `update_recipients`")
5890
5891
5892        collection_formats = {}
5893
5894        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
5895        path_params = {}
5896        if 'account_id' in params:
5897            path_params['accountId'] = params['account_id']
5898        if 'template_id' in params:
5899            path_params['templateId'] = params['template_id']
5900
5901        query_params = {}
5902        if 'resend_envelope' in params:
5903            query_params['resend_envelope'] = params['resend_envelope']
5904
5905        header_params = {}
5906
5907        form_params = []
5908        local_var_files = {}
5909
5910        body_params = None
5911        if 'template_recipients' in params:
5912            body_params = params['template_recipients']
5913        # HTTP header `Accept`
5914        header_params['Accept'] = self.api_client.\
5915            select_header_accept(['application/json'])
5916
5917        # Authentication setting
5918        auth_settings = []
5919
5920        return self.api_client.call_api(resource_path, 'PUT',
5921                                        path_params,
5922                                        query_params,
5923                                        header_params,
5924                                        body=body_params,
5925                                        post_params=form_params,
5926                                        files=local_var_files,
5927                                        response_type='RecipientsUpdateSummary',
5928                                        auth_settings=auth_settings,
5929                                        callback=params.get('callback'),
5930                                        _return_http_data_only=params.get('_return_http_data_only'),
5931                                        _preload_content=params.get('_preload_content', True),
5932                                        _request_timeout=params.get('_request_timeout'),
5933                                        collection_formats=collection_formats)
5934
5935    def update_tabs(self, account_id, recipient_id, template_id, **kwargs):
5936        """
5937        Updates the tabs for a recipient.
5938        Updates one or more tabs for a recipient in a template.
5939        This method makes a synchronous HTTP request by default. To make an
5940        asynchronous HTTP request, please define a `callback` function
5941        to be invoked when receiving the response.
5942        >>> def callback_function(response):
5943        >>>     pprint(response)
5944        >>>
5945        >>> thread = api.update_tabs(account_id, recipient_id, template_id, callback=callback_function)
5946
5947        :param callback function: The callback function
5948            for asynchronous request. (optional)
5949        :param str account_id: The external account number (int) or account ID Guid. (required)
5950        :param str recipient_id: The ID of the recipient being accessed. (required)
5951        :param str template_id: The ID of the template being accessed. (required)
5952        :param TemplateTabs template_tabs:
5953        :return: Tabs
5954                 If the method is called asynchronously,
5955                 returns the request thread.
5956        """
5957        kwargs['_return_http_data_only'] = True
5958        if kwargs.get('callback'):
5959            return self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5960        else:
5961            (data) = self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5962            return data
5963
5964    def update_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
5965        """
5966        Updates the tabs for a recipient.
5967        Updates one or more tabs for a recipient in a template.
5968        This method makes a synchronous HTTP request by default. To make an
5969        asynchronous HTTP request, please define a `callback` function
5970        to be invoked when receiving the response.
5971        >>> def callback_function(response):
5972        >>>     pprint(response)
5973        >>>
5974        >>> thread = api.update_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
5975
5976        :param callback function: The callback function
5977            for asynchronous request. (optional)
5978        :param str account_id: The external account number (int) or account ID Guid. (required)
5979        :param str recipient_id: The ID of the recipient being accessed. (required)
5980        :param str template_id: The ID of the template being accessed. (required)
5981        :param TemplateTabs template_tabs:
5982        :return: Tabs
5983                 If the method is called asynchronously,
5984                 returns the request thread.
5985        """
5986
5987        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
5988        all_params.append('callback')
5989        all_params.append('_return_http_data_only')
5990        all_params.append('_preload_content')
5991        all_params.append('_request_timeout')
5992
5993        params = locals()
5994        for key, val in iteritems(params['kwargs']):
5995            if key not in all_params:
5996                raise TypeError(
5997                    "Got an unexpected keyword argument '%s'"
5998                    " to method update_tabs" % key
5999                )
6000            params[key] = val
6001        del params['kwargs']
6002        # verify the required parameter 'account_id' is set
6003        if ('account_id' not in params) or (params['account_id'] is None):
6004            raise ValueError("Missing the required parameter `account_id` when calling `update_tabs`")
6005        # verify the required parameter 'recipient_id' is set
6006        if ('recipient_id' not in params) or (params['recipient_id'] is None):
6007            raise ValueError("Missing the required parameter `recipient_id` when calling `update_tabs`")
6008        # verify the required parameter 'template_id' is set
6009        if ('template_id' not in params) or (params['template_id'] is None):
6010            raise ValueError("Missing the required parameter `template_id` when calling `update_tabs`")
6011
6012
6013        collection_formats = {}
6014
6015        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
6016        path_params = {}
6017        if 'account_id' in params:
6018            path_params['accountId'] = params['account_id']
6019        if 'recipient_id' in params:
6020            path_params['recipientId'] = params['recipient_id']
6021        if 'template_id' in params:
6022            path_params['templateId'] = params['template_id']
6023
6024        query_params = {}
6025
6026        header_params = {}
6027
6028        form_params = []
6029        local_var_files = {}
6030
6031        body_params = None
6032        if 'template_tabs' in params:
6033            body_params = params['template_tabs']
6034        # HTTP header `Accept`
6035        header_params['Accept'] = self.api_client.\
6036            select_header_accept(['application/json'])
6037
6038        # Authentication setting
6039        auth_settings = []
6040
6041        return self.api_client.call_api(resource_path, 'PUT',
6042                                        path_params,
6043                                        query_params,
6044                                        header_params,
6045                                        body=body_params,
6046                                        post_params=form_params,
6047                                        files=local_var_files,
6048                                        response_type='Tabs',
6049                                        auth_settings=auth_settings,
6050                                        callback=params.get('callback'),
6051                                        _return_http_data_only=params.get('_return_http_data_only'),
6052                                        _preload_content=params.get('_preload_content', True),
6053                                        _request_timeout=params.get('_request_timeout'),
6054                                        collection_formats=collection_formats)
6055
6056    def update_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
6057        """
6058        Updates the tabs for a template
6059        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
6060        This method makes a synchronous HTTP request by default. To make an
6061        asynchronous HTTP request, please define a `callback` function
6062        to be invoked when receiving the response.
6063        >>> def callback_function(response):
6064        >>>     pprint(response)
6065        >>>
6066        >>> thread = api.update_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
6067
6068        :param callback function: The callback function
6069            for asynchronous request. (optional)
6070        :param str account_id: The external account number (int) or account ID Guid. (required)
6071        :param str document_id: The ID of the document being accessed. (required)
6072        :param str template_id: The ID of the template being accessed. (required)
6073        :param TemplateTabs template_tabs:
6074        :return: Tabs
6075                 If the method is called asynchronously,
6076                 returns the request thread.
6077        """
6078        kwargs['_return_http_data_only'] = True
6079        if kwargs.get('callback'):
6080            return self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
6081        else:
6082            (data) = self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
6083            return data
6084
6085    def update_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
6086        """
6087        Updates the tabs for a template
6088        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
6089        This method makes a synchronous HTTP request by default. To make an
6090        asynchronous HTTP request, please define a `callback` function
6091        to be invoked when receiving the response.
6092        >>> def callback_function(response):
6093        >>>     pprint(response)
6094        >>>
6095        >>> thread = api.update_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
6096
6097        :param callback function: The callback function
6098            for asynchronous request. (optional)
6099        :param str account_id: The external account number (int) or account ID Guid. (required)
6100        :param str document_id: The ID of the document being accessed. (required)
6101        :param str template_id: The ID of the template being accessed. (required)
6102        :param TemplateTabs template_tabs:
6103        :return: Tabs
6104                 If the method is called asynchronously,
6105                 returns the request thread.
6106        """
6107
6108        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
6109        all_params.append('callback')
6110        all_params.append('_return_http_data_only')
6111        all_params.append('_preload_content')
6112        all_params.append('_request_timeout')
6113
6114        params = locals()
6115        for key, val in iteritems(params['kwargs']):
6116            if key not in all_params:
6117                raise TypeError(
6118                    "Got an unexpected keyword argument '%s'"
6119                    " to method update_template_document_tabs" % key
6120                )
6121            params[key] = val
6122        del params['kwargs']
6123        # verify the required parameter 'account_id' is set
6124        if ('account_id' not in params) or (params['account_id'] is None):
6125            raise ValueError("Missing the required parameter `account_id` when calling `update_template_document_tabs`")
6126        # verify the required parameter 'document_id' is set
6127        if ('document_id' not in params) or (params['document_id'] is None):
6128            raise ValueError("Missing the required parameter `document_id` when calling `update_template_document_tabs`")
6129        # verify the required parameter 'template_id' is set
6130        if ('template_id' not in params) or (params['template_id'] is None):
6131            raise ValueError("Missing the required parameter `template_id` when calling `update_template_document_tabs`")
6132
6133
6134        collection_formats = {}
6135
6136        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
6137        path_params = {}
6138        if 'account_id' in params:
6139            path_params['accountId'] = params['account_id']
6140        if 'document_id' in params:
6141            path_params['documentId'] = params['document_id']
6142        if 'template_id' in params:
6143            path_params['templateId'] = params['template_id']
6144
6145        query_params = {}
6146
6147        header_params = {}
6148
6149        form_params = []
6150        local_var_files = {}
6151
6152        body_params = None
6153        if 'template_tabs' in params:
6154            body_params = params['template_tabs']
6155        # HTTP header `Accept`
6156        header_params['Accept'] = self.api_client.\
6157            select_header_accept(['application/json'])
6158
6159        # Authentication setting
6160        auth_settings = []
6161
6162        return self.api_client.call_api(resource_path, 'PUT',
6163                                        path_params,
6164                                        query_params,
6165                                        header_params,
6166                                        body=body_params,
6167                                        post_params=form_params,
6168                                        files=local_var_files,
6169                                        response_type='Tabs',
6170                                        auth_settings=auth_settings,
6171                                        callback=params.get('callback'),
6172                                        _return_http_data_only=params.get('_return_http_data_only'),
6173                                        _preload_content=params.get('_preload_content', True),
6174                                        _request_timeout=params.get('_request_timeout'),
6175                                        collection_formats=collection_formats)
class TemplatesApi:
  28class TemplatesApi(object):
  29    """
  30    NOTE: This class is auto generated by the swagger code generator program.
  31    Do not edit the class manually.
  32    Ref: https://github.com/swagger-api/swagger-codegen
  33    """
  34
  35    def __init__(self, api_client=None):
  36        config = Configuration()
  37        if api_client:
  38            self.api_client = api_client
  39        else:
  40            if not config.api_client:
  41                config.api_client = ApiClient()
  42            self.api_client = config.api_client
  43
  44    def create_custom_fields(self, account_id, template_id, **kwargs):
  45        """
  46        Creates custom document fields in an existing template document.
  47        Creates custom document fields in an existing template document.
  48        This method makes a synchronous HTTP request by default. To make an
  49        asynchronous HTTP request, please define a `callback` function
  50        to be invoked when receiving the response.
  51        >>> def callback_function(response):
  52        >>>     pprint(response)
  53        >>>
  54        >>> thread = api.create_custom_fields(account_id, template_id, callback=callback_function)
  55
  56        :param callback function: The callback function
  57            for asynchronous request. (optional)
  58        :param str account_id: The external account number (int) or account ID Guid. (required)
  59        :param str template_id: The ID of the template being accessed. (required)
  60        :param TemplateCustomFields template_custom_fields:
  61        :return: CustomFields
  62                 If the method is called asynchronously,
  63                 returns the request thread.
  64        """
  65        kwargs['_return_http_data_only'] = True
  66        if kwargs.get('callback'):
  67            return self.create_custom_fields_with_http_info(account_id, template_id, **kwargs)
  68        else:
  69            (data) = self.create_custom_fields_with_http_info(account_id, template_id, **kwargs)
  70            return data
  71
  72    def create_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
  73        """
  74        Creates custom document fields in an existing template document.
  75        Creates custom document fields in an existing template document.
  76        This method makes a synchronous HTTP request by default. To make an
  77        asynchronous HTTP request, please define a `callback` function
  78        to be invoked when receiving the response.
  79        >>> def callback_function(response):
  80        >>>     pprint(response)
  81        >>>
  82        >>> thread = api.create_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
  83
  84        :param callback function: The callback function
  85            for asynchronous request. (optional)
  86        :param str account_id: The external account number (int) or account ID Guid. (required)
  87        :param str template_id: The ID of the template being accessed. (required)
  88        :param TemplateCustomFields template_custom_fields:
  89        :return: CustomFields
  90                 If the method is called asynchronously,
  91                 returns the request thread.
  92        """
  93
  94        all_params = ['account_id', 'template_id', 'template_custom_fields']
  95        all_params.append('callback')
  96        all_params.append('_return_http_data_only')
  97        all_params.append('_preload_content')
  98        all_params.append('_request_timeout')
  99
 100        params = locals()
 101        for key, val in iteritems(params['kwargs']):
 102            if key not in all_params:
 103                raise TypeError(
 104                    "Got an unexpected keyword argument '%s'"
 105                    " to method create_custom_fields" % key
 106                )
 107            params[key] = val
 108        del params['kwargs']
 109        # verify the required parameter 'account_id' is set
 110        if ('account_id' not in params) or (params['account_id'] is None):
 111            raise ValueError("Missing the required parameter `account_id` when calling `create_custom_fields`")
 112        # verify the required parameter 'template_id' is set
 113        if ('template_id' not in params) or (params['template_id'] is None):
 114            raise ValueError("Missing the required parameter `template_id` when calling `create_custom_fields`")
 115
 116
 117        collection_formats = {}
 118
 119        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
 120        path_params = {}
 121        if 'account_id' in params:
 122            path_params['accountId'] = params['account_id']
 123        if 'template_id' in params:
 124            path_params['templateId'] = params['template_id']
 125
 126        query_params = {}
 127
 128        header_params = {}
 129
 130        form_params = []
 131        local_var_files = {}
 132
 133        body_params = None
 134        if 'template_custom_fields' in params:
 135            body_params = params['template_custom_fields']
 136        # HTTP header `Accept`
 137        header_params['Accept'] = self.api_client.\
 138            select_header_accept(['application/json'])
 139
 140        # Authentication setting
 141        auth_settings = []
 142
 143        return self.api_client.call_api(resource_path, 'POST',
 144                                        path_params,
 145                                        query_params,
 146                                        header_params,
 147                                        body=body_params,
 148                                        post_params=form_params,
 149                                        files=local_var_files,
 150                                        response_type='CustomFields',
 151                                        auth_settings=auth_settings,
 152                                        callback=params.get('callback'),
 153                                        _return_http_data_only=params.get('_return_http_data_only'),
 154                                        _preload_content=params.get('_preload_content', True),
 155                                        _request_timeout=params.get('_request_timeout'),
 156                                        collection_formats=collection_formats)
 157
 158    def create_document_fields(self, account_id, document_id, template_id, **kwargs):
 159        """
 160        Creates custom document fields in an existing template document.
 161        Creates custom document fields in an existing template document.
 162        This method makes a synchronous HTTP request by default. To make an
 163        asynchronous HTTP request, please define a `callback` function
 164        to be invoked when receiving the response.
 165        >>> def callback_function(response):
 166        >>>     pprint(response)
 167        >>>
 168        >>> thread = api.create_document_fields(account_id, document_id, template_id, callback=callback_function)
 169
 170        :param callback function: The callback function
 171            for asynchronous request. (optional)
 172        :param str account_id: The external account number (int) or account ID Guid. (required)
 173        :param str document_id: The ID of the document being accessed. (required)
 174        :param str template_id: The ID of the template being accessed. (required)
 175        :param DocumentFieldsInformation document_fields_information:
 176        :return: DocumentFieldsInformation
 177                 If the method is called asynchronously,
 178                 returns the request thread.
 179        """
 180        kwargs['_return_http_data_only'] = True
 181        if kwargs.get('callback'):
 182            return self.create_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
 183        else:
 184            (data) = self.create_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
 185            return data
 186
 187    def create_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
 188        """
 189        Creates custom document fields in an existing template document.
 190        Creates custom document fields in an existing template document.
 191        This method makes a synchronous HTTP request by default. To make an
 192        asynchronous HTTP request, please define a `callback` function
 193        to be invoked when receiving the response.
 194        >>> def callback_function(response):
 195        >>>     pprint(response)
 196        >>>
 197        >>> thread = api.create_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
 198
 199        :param callback function: The callback function
 200            for asynchronous request. (optional)
 201        :param str account_id: The external account number (int) or account ID Guid. (required)
 202        :param str document_id: The ID of the document being accessed. (required)
 203        :param str template_id: The ID of the template being accessed. (required)
 204        :param DocumentFieldsInformation document_fields_information:
 205        :return: DocumentFieldsInformation
 206                 If the method is called asynchronously,
 207                 returns the request thread.
 208        """
 209
 210        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
 211        all_params.append('callback')
 212        all_params.append('_return_http_data_only')
 213        all_params.append('_preload_content')
 214        all_params.append('_request_timeout')
 215
 216        params = locals()
 217        for key, val in iteritems(params['kwargs']):
 218            if key not in all_params:
 219                raise TypeError(
 220                    "Got an unexpected keyword argument '%s'"
 221                    " to method create_document_fields" % key
 222                )
 223            params[key] = val
 224        del params['kwargs']
 225        # verify the required parameter 'account_id' is set
 226        if ('account_id' not in params) or (params['account_id'] is None):
 227            raise ValueError("Missing the required parameter `account_id` when calling `create_document_fields`")
 228        # verify the required parameter 'document_id' is set
 229        if ('document_id' not in params) or (params['document_id'] is None):
 230            raise ValueError("Missing the required parameter `document_id` when calling `create_document_fields`")
 231        # verify the required parameter 'template_id' is set
 232        if ('template_id' not in params) or (params['template_id'] is None):
 233            raise ValueError("Missing the required parameter `template_id` when calling `create_document_fields`")
 234
 235
 236        collection_formats = {}
 237
 238        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
 239        path_params = {}
 240        if 'account_id' in params:
 241            path_params['accountId'] = params['account_id']
 242        if 'document_id' in params:
 243            path_params['documentId'] = params['document_id']
 244        if 'template_id' in params:
 245            path_params['templateId'] = params['template_id']
 246
 247        query_params = {}
 248
 249        header_params = {}
 250
 251        form_params = []
 252        local_var_files = {}
 253
 254        body_params = None
 255        if 'document_fields_information' in params:
 256            body_params = params['document_fields_information']
 257        # HTTP header `Accept`
 258        header_params['Accept'] = self.api_client.\
 259            select_header_accept(['application/json'])
 260
 261        # Authentication setting
 262        auth_settings = []
 263
 264        return self.api_client.call_api(resource_path, 'POST',
 265                                        path_params,
 266                                        query_params,
 267                                        header_params,
 268                                        body=body_params,
 269                                        post_params=form_params,
 270                                        files=local_var_files,
 271                                        response_type='DocumentFieldsInformation',
 272                                        auth_settings=auth_settings,
 273                                        callback=params.get('callback'),
 274                                        _return_http_data_only=params.get('_return_http_data_only'),
 275                                        _preload_content=params.get('_preload_content', True),
 276                                        _request_timeout=params.get('_request_timeout'),
 277                                        collection_formats=collection_formats)
 278
 279    def create_edit_view(self, account_id, template_id, **kwargs):
 280        """
 281        Provides a URL to start an edit view of the Template UI
 282        This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI.
 283        This method makes a synchronous HTTP request by default. To make an
 284        asynchronous HTTP request, please define a `callback` function
 285        to be invoked when receiving the response.
 286        >>> def callback_function(response):
 287        >>>     pprint(response)
 288        >>>
 289        >>> thread = api.create_edit_view(account_id, template_id, callback=callback_function)
 290
 291        :param callback function: The callback function
 292            for asynchronous request. (optional)
 293        :param str account_id: The external account number (int) or account ID Guid. (required)
 294        :param str template_id: The ID of the template being accessed. (required)
 295        :param ReturnUrlRequest return_url_request:
 296        :return: ViewUrl
 297                 If the method is called asynchronously,
 298                 returns the request thread.
 299        """
 300        kwargs['_return_http_data_only'] = True
 301        if kwargs.get('callback'):
 302            return self.create_edit_view_with_http_info(account_id, template_id, **kwargs)
 303        else:
 304            (data) = self.create_edit_view_with_http_info(account_id, template_id, **kwargs)
 305            return data
 306
 307    def create_edit_view_with_http_info(self, account_id, template_id, **kwargs):
 308        """
 309        Provides a URL to start an edit view of the Template UI
 310        This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI.
 311        This method makes a synchronous HTTP request by default. To make an
 312        asynchronous HTTP request, please define a `callback` function
 313        to be invoked when receiving the response.
 314        >>> def callback_function(response):
 315        >>>     pprint(response)
 316        >>>
 317        >>> thread = api.create_edit_view_with_http_info(account_id, template_id, callback=callback_function)
 318
 319        :param callback function: The callback function
 320            for asynchronous request. (optional)
 321        :param str account_id: The external account number (int) or account ID Guid. (required)
 322        :param str template_id: The ID of the template being accessed. (required)
 323        :param ReturnUrlRequest return_url_request:
 324        :return: ViewUrl
 325                 If the method is called asynchronously,
 326                 returns the request thread.
 327        """
 328
 329        all_params = ['account_id', 'template_id', 'return_url_request']
 330        all_params.append('callback')
 331        all_params.append('_return_http_data_only')
 332        all_params.append('_preload_content')
 333        all_params.append('_request_timeout')
 334
 335        params = locals()
 336        for key, val in iteritems(params['kwargs']):
 337            if key not in all_params:
 338                raise TypeError(
 339                    "Got an unexpected keyword argument '%s'"
 340                    " to method create_edit_view" % key
 341                )
 342            params[key] = val
 343        del params['kwargs']
 344        # verify the required parameter 'account_id' is set
 345        if ('account_id' not in params) or (params['account_id'] is None):
 346            raise ValueError("Missing the required parameter `account_id` when calling `create_edit_view`")
 347        # verify the required parameter 'template_id' is set
 348        if ('template_id' not in params) or (params['template_id'] is None):
 349            raise ValueError("Missing the required parameter `template_id` when calling `create_edit_view`")
 350
 351
 352        collection_formats = {}
 353
 354        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/edit'.replace('{format}', 'json')
 355        path_params = {}
 356        if 'account_id' in params:
 357            path_params['accountId'] = params['account_id']
 358        if 'template_id' in params:
 359            path_params['templateId'] = params['template_id']
 360
 361        query_params = {}
 362
 363        header_params = {}
 364
 365        form_params = []
 366        local_var_files = {}
 367
 368        body_params = None
 369        if 'return_url_request' in params:
 370            body_params = params['return_url_request']
 371        # HTTP header `Accept`
 372        header_params['Accept'] = self.api_client.\
 373            select_header_accept(['application/json'])
 374
 375        # Authentication setting
 376        auth_settings = []
 377
 378        return self.api_client.call_api(resource_path, 'POST',
 379                                        path_params,
 380                                        query_params,
 381                                        header_params,
 382                                        body=body_params,
 383                                        post_params=form_params,
 384                                        files=local_var_files,
 385                                        response_type='ViewUrl',
 386                                        auth_settings=auth_settings,
 387                                        callback=params.get('callback'),
 388                                        _return_http_data_only=params.get('_return_http_data_only'),
 389                                        _preload_content=params.get('_preload_content', True),
 390                                        _request_timeout=params.get('_request_timeout'),
 391                                        collection_formats=collection_formats)
 392
 393    def create_lock(self, account_id, template_id, **kwargs):
 394        """
 395        Lock a template.
 396        Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template.  ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user).
 397        This method makes a synchronous HTTP request by default. To make an
 398        asynchronous HTTP request, please define a `callback` function
 399        to be invoked when receiving the response.
 400        >>> def callback_function(response):
 401        >>>     pprint(response)
 402        >>>
 403        >>> thread = api.create_lock(account_id, template_id, callback=callback_function)
 404
 405        :param callback function: The callback function
 406            for asynchronous request. (optional)
 407        :param str account_id: The external account number (int) or account ID Guid. (required)
 408        :param str template_id: The ID of the template being accessed. (required)
 409        :param LockRequest lock_request:
 410        :return: LockInformation
 411                 If the method is called asynchronously,
 412                 returns the request thread.
 413        """
 414        kwargs['_return_http_data_only'] = True
 415        if kwargs.get('callback'):
 416            return self.create_lock_with_http_info(account_id, template_id, **kwargs)
 417        else:
 418            (data) = self.create_lock_with_http_info(account_id, template_id, **kwargs)
 419            return data
 420
 421    def create_lock_with_http_info(self, account_id, template_id, **kwargs):
 422        """
 423        Lock a template.
 424        Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template.  ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user).
 425        This method makes a synchronous HTTP request by default. To make an
 426        asynchronous HTTP request, please define a `callback` function
 427        to be invoked when receiving the response.
 428        >>> def callback_function(response):
 429        >>>     pprint(response)
 430        >>>
 431        >>> thread = api.create_lock_with_http_info(account_id, template_id, callback=callback_function)
 432
 433        :param callback function: The callback function
 434            for asynchronous request. (optional)
 435        :param str account_id: The external account number (int) or account ID Guid. (required)
 436        :param str template_id: The ID of the template being accessed. (required)
 437        :param LockRequest lock_request:
 438        :return: LockInformation
 439                 If the method is called asynchronously,
 440                 returns the request thread.
 441        """
 442
 443        all_params = ['account_id', 'template_id', 'lock_request']
 444        all_params.append('callback')
 445        all_params.append('_return_http_data_only')
 446        all_params.append('_preload_content')
 447        all_params.append('_request_timeout')
 448
 449        params = locals()
 450        for key, val in iteritems(params['kwargs']):
 451            if key not in all_params:
 452                raise TypeError(
 453                    "Got an unexpected keyword argument '%s'"
 454                    " to method create_lock" % key
 455                )
 456            params[key] = val
 457        del params['kwargs']
 458        # verify the required parameter 'account_id' is set
 459        if ('account_id' not in params) or (params['account_id'] is None):
 460            raise ValueError("Missing the required parameter `account_id` when calling `create_lock`")
 461        # verify the required parameter 'template_id' is set
 462        if ('template_id' not in params) or (params['template_id'] is None):
 463            raise ValueError("Missing the required parameter `template_id` when calling `create_lock`")
 464
 465
 466        collection_formats = {}
 467
 468        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
 469        path_params = {}
 470        if 'account_id' in params:
 471            path_params['accountId'] = params['account_id']
 472        if 'template_id' in params:
 473            path_params['templateId'] = params['template_id']
 474
 475        query_params = {}
 476
 477        header_params = {}
 478
 479        form_params = []
 480        local_var_files = {}
 481
 482        body_params = None
 483        if 'lock_request' in params:
 484            body_params = params['lock_request']
 485        # HTTP header `Accept`
 486        header_params['Accept'] = self.api_client.\
 487            select_header_accept(['application/json'])
 488
 489        # Authentication setting
 490        auth_settings = []
 491
 492        return self.api_client.call_api(resource_path, 'POST',
 493                                        path_params,
 494                                        query_params,
 495                                        header_params,
 496                                        body=body_params,
 497                                        post_params=form_params,
 498                                        files=local_var_files,
 499                                        response_type='LockInformation',
 500                                        auth_settings=auth_settings,
 501                                        callback=params.get('callback'),
 502                                        _return_http_data_only=params.get('_return_http_data_only'),
 503                                        _preload_content=params.get('_preload_content', True),
 504                                        _request_timeout=params.get('_request_timeout'),
 505                                        collection_formats=collection_formats)
 506
 507    def create_recipients(self, account_id, template_id, **kwargs):
 508        """
 509        Adds tabs for a recipient.
 510        Adds one or more recipients to a template.
 511        This method makes a synchronous HTTP request by default. To make an
 512        asynchronous HTTP request, please define a `callback` function
 513        to be invoked when receiving the response.
 514        >>> def callback_function(response):
 515        >>>     pprint(response)
 516        >>>
 517        >>> thread = api.create_recipients(account_id, template_id, callback=callback_function)
 518
 519        :param callback function: The callback function
 520            for asynchronous request. (optional)
 521        :param str account_id: The external account number (int) or account ID Guid. (required)
 522        :param str template_id: The ID of the template being accessed. (required)
 523        :param str resend_envelope:
 524        :param TemplateRecipients template_recipients:
 525        :return: Recipients
 526                 If the method is called asynchronously,
 527                 returns the request thread.
 528        """
 529        kwargs['_return_http_data_only'] = True
 530        if kwargs.get('callback'):
 531            return self.create_recipients_with_http_info(account_id, template_id, **kwargs)
 532        else:
 533            (data) = self.create_recipients_with_http_info(account_id, template_id, **kwargs)
 534            return data
 535
 536    def create_recipients_with_http_info(self, account_id, template_id, **kwargs):
 537        """
 538        Adds tabs for a recipient.
 539        Adds one or more recipients to a template.
 540        This method makes a synchronous HTTP request by default. To make an
 541        asynchronous HTTP request, please define a `callback` function
 542        to be invoked when receiving the response.
 543        >>> def callback_function(response):
 544        >>>     pprint(response)
 545        >>>
 546        >>> thread = api.create_recipients_with_http_info(account_id, template_id, callback=callback_function)
 547
 548        :param callback function: The callback function
 549            for asynchronous request. (optional)
 550        :param str account_id: The external account number (int) or account ID Guid. (required)
 551        :param str template_id: The ID of the template being accessed. (required)
 552        :param str resend_envelope:
 553        :param TemplateRecipients template_recipients:
 554        :return: Recipients
 555                 If the method is called asynchronously,
 556                 returns the request thread.
 557        """
 558
 559        all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients']
 560        all_params.append('callback')
 561        all_params.append('_return_http_data_only')
 562        all_params.append('_preload_content')
 563        all_params.append('_request_timeout')
 564
 565        params = locals()
 566        for key, val in iteritems(params['kwargs']):
 567            if key not in all_params:
 568                raise TypeError(
 569                    "Got an unexpected keyword argument '%s'"
 570                    " to method create_recipients" % key
 571                )
 572            params[key] = val
 573        del params['kwargs']
 574        # verify the required parameter 'account_id' is set
 575        if ('account_id' not in params) or (params['account_id'] is None):
 576            raise ValueError("Missing the required parameter `account_id` when calling `create_recipients`")
 577        # verify the required parameter 'template_id' is set
 578        if ('template_id' not in params) or (params['template_id'] is None):
 579            raise ValueError("Missing the required parameter `template_id` when calling `create_recipients`")
 580
 581
 582        collection_formats = {}
 583
 584        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
 585        path_params = {}
 586        if 'account_id' in params:
 587            path_params['accountId'] = params['account_id']
 588        if 'template_id' in params:
 589            path_params['templateId'] = params['template_id']
 590
 591        query_params = {}
 592        if 'resend_envelope' in params:
 593            query_params['resend_envelope'] = params['resend_envelope']
 594
 595        header_params = {}
 596
 597        form_params = []
 598        local_var_files = {}
 599
 600        body_params = None
 601        if 'template_recipients' in params:
 602            body_params = params['template_recipients']
 603        # HTTP header `Accept`
 604        header_params['Accept'] = self.api_client.\
 605            select_header_accept(['application/json'])
 606
 607        # Authentication setting
 608        auth_settings = []
 609
 610        return self.api_client.call_api(resource_path, 'POST',
 611                                        path_params,
 612                                        query_params,
 613                                        header_params,
 614                                        body=body_params,
 615                                        post_params=form_params,
 616                                        files=local_var_files,
 617                                        response_type='Recipients',
 618                                        auth_settings=auth_settings,
 619                                        callback=params.get('callback'),
 620                                        _return_http_data_only=params.get('_return_http_data_only'),
 621                                        _preload_content=params.get('_preload_content', True),
 622                                        _request_timeout=params.get('_request_timeout'),
 623                                        collection_formats=collection_formats)
 624
 625    def create_tabs(self, account_id, recipient_id, template_id, **kwargs):
 626        """
 627        Adds tabs for a recipient.
 628        Adds one or more tabs for a recipient.
 629        This method makes a synchronous HTTP request by default. To make an
 630        asynchronous HTTP request, please define a `callback` function
 631        to be invoked when receiving the response.
 632        >>> def callback_function(response):
 633        >>>     pprint(response)
 634        >>>
 635        >>> thread = api.create_tabs(account_id, recipient_id, template_id, callback=callback_function)
 636
 637        :param callback function: The callback function
 638            for asynchronous request. (optional)
 639        :param str account_id: The external account number (int) or account ID Guid. (required)
 640        :param str recipient_id: The ID of the recipient being accessed. (required)
 641        :param str template_id: The ID of the template being accessed. (required)
 642        :param TemplateTabs template_tabs:
 643        :return: Tabs
 644                 If the method is called asynchronously,
 645                 returns the request thread.
 646        """
 647        kwargs['_return_http_data_only'] = True
 648        if kwargs.get('callback'):
 649            return self.create_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
 650        else:
 651            (data) = self.create_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
 652            return data
 653
 654    def create_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
 655        """
 656        Adds tabs for a recipient.
 657        Adds one or more tabs for a recipient.
 658        This method makes a synchronous HTTP request by default. To make an
 659        asynchronous HTTP request, please define a `callback` function
 660        to be invoked when receiving the response.
 661        >>> def callback_function(response):
 662        >>>     pprint(response)
 663        >>>
 664        >>> thread = api.create_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
 665
 666        :param callback function: The callback function
 667            for asynchronous request. (optional)
 668        :param str account_id: The external account number (int) or account ID Guid. (required)
 669        :param str recipient_id: The ID of the recipient being accessed. (required)
 670        :param str template_id: The ID of the template being accessed. (required)
 671        :param TemplateTabs template_tabs:
 672        :return: Tabs
 673                 If the method is called asynchronously,
 674                 returns the request thread.
 675        """
 676
 677        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
 678        all_params.append('callback')
 679        all_params.append('_return_http_data_only')
 680        all_params.append('_preload_content')
 681        all_params.append('_request_timeout')
 682
 683        params = locals()
 684        for key, val in iteritems(params['kwargs']):
 685            if key not in all_params:
 686                raise TypeError(
 687                    "Got an unexpected keyword argument '%s'"
 688                    " to method create_tabs" % key
 689                )
 690            params[key] = val
 691        del params['kwargs']
 692        # verify the required parameter 'account_id' is set
 693        if ('account_id' not in params) or (params['account_id'] is None):
 694            raise ValueError("Missing the required parameter `account_id` when calling `create_tabs`")
 695        # verify the required parameter 'recipient_id' is set
 696        if ('recipient_id' not in params) or (params['recipient_id'] is None):
 697            raise ValueError("Missing the required parameter `recipient_id` when calling `create_tabs`")
 698        # verify the required parameter 'template_id' is set
 699        if ('template_id' not in params) or (params['template_id'] is None):
 700            raise ValueError("Missing the required parameter `template_id` when calling `create_tabs`")
 701
 702
 703        collection_formats = {}
 704
 705        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
 706        path_params = {}
 707        if 'account_id' in params:
 708            path_params['accountId'] = params['account_id']
 709        if 'recipient_id' in params:
 710            path_params['recipientId'] = params['recipient_id']
 711        if 'template_id' in params:
 712            path_params['templateId'] = params['template_id']
 713
 714        query_params = {}
 715
 716        header_params = {}
 717
 718        form_params = []
 719        local_var_files = {}
 720
 721        body_params = None
 722        if 'template_tabs' in params:
 723            body_params = params['template_tabs']
 724        # HTTP header `Accept`
 725        header_params['Accept'] = self.api_client.\
 726            select_header_accept(['application/json'])
 727
 728        # Authentication setting
 729        auth_settings = []
 730
 731        return self.api_client.call_api(resource_path, 'POST',
 732                                        path_params,
 733                                        query_params,
 734                                        header_params,
 735                                        body=body_params,
 736                                        post_params=form_params,
 737                                        files=local_var_files,
 738                                        response_type='Tabs',
 739                                        auth_settings=auth_settings,
 740                                        callback=params.get('callback'),
 741                                        _return_http_data_only=params.get('_return_http_data_only'),
 742                                        _preload_content=params.get('_preload_content', True),
 743                                        _request_timeout=params.get('_request_timeout'),
 744                                        collection_formats=collection_formats)
 745
 746    def create_template(self, account_id, **kwargs):
 747        """
 748        Creates an envelope from a template.
 749        Creates a template definition using a multipart request.  ###Template Email Subject Merge Fields  Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template.  The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line.  Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject.  To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_UserName]]  Example:  `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",`  To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_Email]]  Example:  `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",`   In both cases the <roleName> is the recipient's contents of the `roleName` property in the template.  For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject.
 750        This method makes a synchronous HTTP request by default. To make an
 751        asynchronous HTTP request, please define a `callback` function
 752        to be invoked when receiving the response.
 753        >>> def callback_function(response):
 754        >>>     pprint(response)
 755        >>>
 756        >>> thread = api.create_template(account_id, callback=callback_function)
 757
 758        :param callback function: The callback function
 759            for asynchronous request. (optional)
 760        :param str account_id: The external account number (int) or account ID Guid. (required)
 761        :param EnvelopeTemplate envelope_template:
 762        :return: TemplateSummary
 763                 If the method is called asynchronously,
 764                 returns the request thread.
 765        """
 766        kwargs['_return_http_data_only'] = True
 767        if kwargs.get('callback'):
 768            return self.create_template_with_http_info(account_id, **kwargs)
 769        else:
 770            (data) = self.create_template_with_http_info(account_id, **kwargs)
 771            return data
 772
 773    def create_template_with_http_info(self, account_id, **kwargs):
 774        """
 775        Creates an envelope from a template.
 776        Creates a template definition using a multipart request.  ###Template Email Subject Merge Fields  Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template.  The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line.  Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject.  To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_UserName]]  Example:  `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",`  To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_Email]]  Example:  `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",`   In both cases the <roleName> is the recipient's contents of the `roleName` property in the template.  For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject.
 777        This method makes a synchronous HTTP request by default. To make an
 778        asynchronous HTTP request, please define a `callback` function
 779        to be invoked when receiving the response.
 780        >>> def callback_function(response):
 781        >>>     pprint(response)
 782        >>>
 783        >>> thread = api.create_template_with_http_info(account_id, callback=callback_function)
 784
 785        :param callback function: The callback function
 786            for asynchronous request. (optional)
 787        :param str account_id: The external account number (int) or account ID Guid. (required)
 788        :param EnvelopeTemplate envelope_template:
 789        :return: TemplateSummary
 790                 If the method is called asynchronously,
 791                 returns the request thread.
 792        """
 793
 794        all_params = ['account_id', 'envelope_template']
 795        all_params.append('callback')
 796        all_params.append('_return_http_data_only')
 797        all_params.append('_preload_content')
 798        all_params.append('_request_timeout')
 799
 800        params = locals()
 801        for key, val in iteritems(params['kwargs']):
 802            if key not in all_params:
 803                raise TypeError(
 804                    "Got an unexpected keyword argument '%s'"
 805                    " to method create_template" % key
 806                )
 807            params[key] = val
 808        del params['kwargs']
 809        # verify the required parameter 'account_id' is set
 810        if ('account_id' not in params) or (params['account_id'] is None):
 811            raise ValueError("Missing the required parameter `account_id` when calling `create_template`")
 812
 813
 814        collection_formats = {}
 815
 816        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
 817        path_params = {}
 818        if 'account_id' in params:
 819            path_params['accountId'] = params['account_id']
 820
 821        query_params = {}
 822
 823        header_params = {}
 824
 825        form_params = []
 826        local_var_files = {}
 827
 828        body_params = None
 829        if 'envelope_template' in params:
 830            body_params = params['envelope_template']
 831        # HTTP header `Accept`
 832        header_params['Accept'] = self.api_client.\
 833            select_header_accept(['application/json'])
 834
 835        # Authentication setting
 836        auth_settings = []
 837
 838        return self.api_client.call_api(resource_path, 'POST',
 839                                        path_params,
 840                                        query_params,
 841                                        header_params,
 842                                        body=body_params,
 843                                        post_params=form_params,
 844                                        files=local_var_files,
 845                                        response_type='TemplateSummary',
 846                                        auth_settings=auth_settings,
 847                                        callback=params.get('callback'),
 848                                        _return_http_data_only=params.get('_return_http_data_only'),
 849                                        _preload_content=params.get('_preload_content', True),
 850                                        _request_timeout=params.get('_request_timeout'),
 851                                        collection_formats=collection_formats)
 852
 853    def create_template_document_responsive_html_preview(self, account_id, document_id, template_id, **kwargs):
 854        """
 855        Post Responsive HTML Preview for a document in a template.
 856        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document.
 857        This method makes a synchronous HTTP request by default. To make an
 858        asynchronous HTTP request, please define a `callback` function
 859        to be invoked when receiving the response.
 860        >>> def callback_function(response):
 861        >>>     pprint(response)
 862        >>>
 863        >>> thread = api.create_template_document_responsive_html_preview(account_id, document_id, template_id, callback=callback_function)
 864
 865        :param callback function: The callback function
 866            for asynchronous request. (optional)
 867        :param str account_id: The external account number (int) or account ID Guid. (required)
 868        :param str document_id: The ID of the document being accessed. (required)
 869        :param str template_id: The ID of the template being accessed. (required)
 870        :param DocumentHtmlDefinition document_html_definition:
 871        :return: DocumentHtmlDefinitions
 872                 If the method is called asynchronously,
 873                 returns the request thread.
 874        """
 875        kwargs['_return_http_data_only'] = True
 876        if kwargs.get('callback'):
 877            return self.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, **kwargs)
 878        else:
 879            (data) = self.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, **kwargs)
 880            return data
 881
 882    def create_template_document_responsive_html_preview_with_http_info(self, account_id, document_id, template_id, **kwargs):
 883        """
 884        Post Responsive HTML Preview for a document in a template.
 885        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document.
 886        This method makes a synchronous HTTP request by default. To make an
 887        asynchronous HTTP request, please define a `callback` function
 888        to be invoked when receiving the response.
 889        >>> def callback_function(response):
 890        >>>     pprint(response)
 891        >>>
 892        >>> thread = api.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, callback=callback_function)
 893
 894        :param callback function: The callback function
 895            for asynchronous request. (optional)
 896        :param str account_id: The external account number (int) or account ID Guid. (required)
 897        :param str document_id: The ID of the document being accessed. (required)
 898        :param str template_id: The ID of the template being accessed. (required)
 899        :param DocumentHtmlDefinition document_html_definition:
 900        :return: DocumentHtmlDefinitions
 901                 If the method is called asynchronously,
 902                 returns the request thread.
 903        """
 904
 905        all_params = ['account_id', 'document_id', 'template_id', 'document_html_definition']
 906        all_params.append('callback')
 907        all_params.append('_return_http_data_only')
 908        all_params.append('_preload_content')
 909        all_params.append('_request_timeout')
 910
 911        params = locals()
 912        for key, val in iteritems(params['kwargs']):
 913            if key not in all_params:
 914                raise TypeError(
 915                    "Got an unexpected keyword argument '%s'"
 916                    " to method create_template_document_responsive_html_preview" % key
 917                )
 918            params[key] = val
 919        del params['kwargs']
 920        # verify the required parameter 'account_id' is set
 921        if ('account_id' not in params) or (params['account_id'] is None):
 922            raise ValueError("Missing the required parameter `account_id` when calling `create_template_document_responsive_html_preview`")
 923        # verify the required parameter 'document_id' is set
 924        if ('document_id' not in params) or (params['document_id'] is None):
 925            raise ValueError("Missing the required parameter `document_id` when calling `create_template_document_responsive_html_preview`")
 926        # verify the required parameter 'template_id' is set
 927        if ('template_id' not in params) or (params['template_id'] is None):
 928            raise ValueError("Missing the required parameter `template_id` when calling `create_template_document_responsive_html_preview`")
 929
 930
 931        collection_formats = {}
 932
 933        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/responsive_html_preview'.replace('{format}', 'json')
 934        path_params = {}
 935        if 'account_id' in params:
 936            path_params['accountId'] = params['account_id']
 937        if 'document_id' in params:
 938            path_params['documentId'] = params['document_id']
 939        if 'template_id' in params:
 940            path_params['templateId'] = params['template_id']
 941
 942        query_params = {}
 943
 944        header_params = {}
 945
 946        form_params = []
 947        local_var_files = {}
 948
 949        body_params = None
 950        if 'document_html_definition' in params:
 951            body_params = params['document_html_definition']
 952        # HTTP header `Accept`
 953        header_params['Accept'] = self.api_client.\
 954            select_header_accept(['application/json'])
 955
 956        # Authentication setting
 957        auth_settings = []
 958
 959        return self.api_client.call_api(resource_path, 'POST',
 960                                        path_params,
 961                                        query_params,
 962                                        header_params,
 963                                        body=body_params,
 964                                        post_params=form_params,
 965                                        files=local_var_files,
 966                                        response_type='DocumentHtmlDefinitions',
 967                                        auth_settings=auth_settings,
 968                                        callback=params.get('callback'),
 969                                        _return_http_data_only=params.get('_return_http_data_only'),
 970                                        _preload_content=params.get('_preload_content', True),
 971                                        _request_timeout=params.get('_request_timeout'),
 972                                        collection_formats=collection_formats)
 973
 974    def create_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
 975        """
 976        Adds the tabs to a tempate
 977        Adds tabs to the document specified by `documentId` in the template specified by `templateId`.  In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/templates/templatedocumenttabs/create/#definition__templatetabs_prefilltabs), your request body might look like this:  ``` {   \"prefillTabs\": {     \"textTabs\": [       {         \"value\": \"a prefill text tab\",         \"pageNumber\": \"1\",         \"documentId\": \"1\",         \"xPosition\": 316,         \"yPosition\": 97       }     ]   } } ``` 
 978        This method makes a synchronous HTTP request by default. To make an
 979        asynchronous HTTP request, please define a `callback` function
 980        to be invoked when receiving the response.
 981        >>> def callback_function(response):
 982        >>>     pprint(response)
 983        >>>
 984        >>> thread = api.create_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
 985
 986        :param callback function: The callback function
 987            for asynchronous request. (optional)
 988        :param str account_id: The external account number (int) or account ID Guid. (required)
 989        :param str document_id: The ID of the document being accessed. (required)
 990        :param str template_id: The ID of the template being accessed. (required)
 991        :param TemplateTabs template_tabs:
 992        :return: Tabs
 993                 If the method is called asynchronously,
 994                 returns the request thread.
 995        """
 996        kwargs['_return_http_data_only'] = True
 997        if kwargs.get('callback'):
 998            return self.create_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
 999        else:
1000            (data) = self.create_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
1001            return data
1002
1003    def create_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
1004        """
1005        Adds the tabs to a tempate
1006        Adds tabs to the document specified by `documentId` in the template specified by `templateId`.  In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/templates/templatedocumenttabs/create/#definition__templatetabs_prefilltabs), your request body might look like this:  ``` {   \"prefillTabs\": {     \"textTabs\": [       {         \"value\": \"a prefill text tab\",         \"pageNumber\": \"1\",         \"documentId\": \"1\",         \"xPosition\": 316,         \"yPosition\": 97       }     ]   } } ``` 
1007        This method makes a synchronous HTTP request by default. To make an
1008        asynchronous HTTP request, please define a `callback` function
1009        to be invoked when receiving the response.
1010        >>> def callback_function(response):
1011        >>>     pprint(response)
1012        >>>
1013        >>> thread = api.create_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
1014
1015        :param callback function: The callback function
1016            for asynchronous request. (optional)
1017        :param str account_id: The external account number (int) or account ID Guid. (required)
1018        :param str document_id: The ID of the document being accessed. (required)
1019        :param str template_id: The ID of the template being accessed. (required)
1020        :param TemplateTabs template_tabs:
1021        :return: Tabs
1022                 If the method is called asynchronously,
1023                 returns the request thread.
1024        """
1025
1026        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
1027        all_params.append('callback')
1028        all_params.append('_return_http_data_only')
1029        all_params.append('_preload_content')
1030        all_params.append('_request_timeout')
1031
1032        params = locals()
1033        for key, val in iteritems(params['kwargs']):
1034            if key not in all_params:
1035                raise TypeError(
1036                    "Got an unexpected keyword argument '%s'"
1037                    " to method create_template_document_tabs" % key
1038                )
1039            params[key] = val
1040        del params['kwargs']
1041        # verify the required parameter 'account_id' is set
1042        if ('account_id' not in params) or (params['account_id'] is None):
1043            raise ValueError("Missing the required parameter `account_id` when calling `create_template_document_tabs`")
1044        # verify the required parameter 'document_id' is set
1045        if ('document_id' not in params) or (params['document_id'] is None):
1046            raise ValueError("Missing the required parameter `document_id` when calling `create_template_document_tabs`")
1047        # verify the required parameter 'template_id' is set
1048        if ('template_id' not in params) or (params['template_id'] is None):
1049            raise ValueError("Missing the required parameter `template_id` when calling `create_template_document_tabs`")
1050
1051
1052        collection_formats = {}
1053
1054        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
1055        path_params = {}
1056        if 'account_id' in params:
1057            path_params['accountId'] = params['account_id']
1058        if 'document_id' in params:
1059            path_params['documentId'] = params['document_id']
1060        if 'template_id' in params:
1061            path_params['templateId'] = params['template_id']
1062
1063        query_params = {}
1064
1065        header_params = {}
1066
1067        form_params = []
1068        local_var_files = {}
1069
1070        body_params = None
1071        if 'template_tabs' in params:
1072            body_params = params['template_tabs']
1073        # HTTP header `Accept`
1074        header_params['Accept'] = self.api_client.\
1075            select_header_accept(['application/json'])
1076
1077        # Authentication setting
1078        auth_settings = []
1079
1080        return self.api_client.call_api(resource_path, 'POST',
1081                                        path_params,
1082                                        query_params,
1083                                        header_params,
1084                                        body=body_params,
1085                                        post_params=form_params,
1086                                        files=local_var_files,
1087                                        response_type='Tabs',
1088                                        auth_settings=auth_settings,
1089                                        callback=params.get('callback'),
1090                                        _return_http_data_only=params.get('_return_http_data_only'),
1091                                        _preload_content=params.get('_preload_content', True),
1092                                        _request_timeout=params.get('_request_timeout'),
1093                                        collection_formats=collection_formats)
1094
1095    def create_template_recipient_preview(self, account_id, template_id, **kwargs):
1096        """
1097        Provides a URL to start a recipient view of the Envelope UI
1098        This method returns a URL for a template recipient preview  in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience.  For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents).
1099        This method makes a synchronous HTTP request by default. To make an
1100        asynchronous HTTP request, please define a `callback` function
1101        to be invoked when receiving the response.
1102        >>> def callback_function(response):
1103        >>>     pprint(response)
1104        >>>
1105        >>> thread = api.create_template_recipient_preview(account_id, template_id, callback=callback_function)
1106
1107        :param callback function: The callback function
1108            for asynchronous request. (optional)
1109        :param str account_id: The external account number (int) or account ID Guid. (required)
1110        :param str template_id: The ID of the template being accessed. (required)
1111        :param RecipientPreviewRequest recipient_preview_request:
1112        :return: ViewUrl
1113                 If the method is called asynchronously,
1114                 returns the request thread.
1115        """
1116        kwargs['_return_http_data_only'] = True
1117        if kwargs.get('callback'):
1118            return self.create_template_recipient_preview_with_http_info(account_id, template_id, **kwargs)
1119        else:
1120            (data) = self.create_template_recipient_preview_with_http_info(account_id, template_id, **kwargs)
1121            return data
1122
1123    def create_template_recipient_preview_with_http_info(self, account_id, template_id, **kwargs):
1124        """
1125        Provides a URL to start a recipient view of the Envelope UI
1126        This method returns a URL for a template recipient preview  in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience.  For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents).
1127        This method makes a synchronous HTTP request by default. To make an
1128        asynchronous HTTP request, please define a `callback` function
1129        to be invoked when receiving the response.
1130        >>> def callback_function(response):
1131        >>>     pprint(response)
1132        >>>
1133        >>> thread = api.create_template_recipient_preview_with_http_info(account_id, template_id, callback=callback_function)
1134
1135        :param callback function: The callback function
1136            for asynchronous request. (optional)
1137        :param str account_id: The external account number (int) or account ID Guid. (required)
1138        :param str template_id: The ID of the template being accessed. (required)
1139        :param RecipientPreviewRequest recipient_preview_request:
1140        :return: ViewUrl
1141                 If the method is called asynchronously,
1142                 returns the request thread.
1143        """
1144
1145        all_params = ['account_id', 'template_id', 'recipient_preview_request']
1146        all_params.append('callback')
1147        all_params.append('_return_http_data_only')
1148        all_params.append('_preload_content')
1149        all_params.append('_request_timeout')
1150
1151        params = locals()
1152        for key, val in iteritems(params['kwargs']):
1153            if key not in all_params:
1154                raise TypeError(
1155                    "Got an unexpected keyword argument '%s'"
1156                    " to method create_template_recipient_preview" % key
1157                )
1158            params[key] = val
1159        del params['kwargs']
1160        # verify the required parameter 'account_id' is set
1161        if ('account_id' not in params) or (params['account_id'] is None):
1162            raise ValueError("Missing the required parameter `account_id` when calling `create_template_recipient_preview`")
1163        # verify the required parameter 'template_id' is set
1164        if ('template_id' not in params) or (params['template_id'] is None):
1165            raise ValueError("Missing the required parameter `template_id` when calling `create_template_recipient_preview`")
1166
1167
1168        collection_formats = {}
1169
1170        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/recipient_preview'.replace('{format}', 'json')
1171        path_params = {}
1172        if 'account_id' in params:
1173            path_params['accountId'] = params['account_id']
1174        if 'template_id' in params:
1175            path_params['templateId'] = params['template_id']
1176
1177        query_params = {}
1178
1179        header_params = {}
1180
1181        form_params = []
1182        local_var_files = {}
1183
1184        body_params = None
1185        if 'recipient_preview_request' in params:
1186            body_params = params['recipient_preview_request']
1187        # HTTP header `Accept`
1188        header_params['Accept'] = self.api_client.\
1189            select_header_accept(['application/json'])
1190
1191        # Authentication setting
1192        auth_settings = []
1193
1194        return self.api_client.call_api(resource_path, 'POST',
1195                                        path_params,
1196                                        query_params,
1197                                        header_params,
1198                                        body=body_params,
1199                                        post_params=form_params,
1200                                        files=local_var_files,
1201                                        response_type='ViewUrl',
1202                                        auth_settings=auth_settings,
1203                                        callback=params.get('callback'),
1204                                        _return_http_data_only=params.get('_return_http_data_only'),
1205                                        _preload_content=params.get('_preload_content', True),
1206                                        _request_timeout=params.get('_request_timeout'),
1207                                        collection_formats=collection_formats)
1208
1209    def create_template_responsive_html_preview(self, account_id, template_id, **kwargs):
1210        """
1211        Get Responsive HTML Preview for all documents in a template.
1212        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents.
1213        This method makes a synchronous HTTP request by default. To make an
1214        asynchronous HTTP request, please define a `callback` function
1215        to be invoked when receiving the response.
1216        >>> def callback_function(response):
1217        >>>     pprint(response)
1218        >>>
1219        >>> thread = api.create_template_responsive_html_preview(account_id, template_id, callback=callback_function)
1220
1221        :param callback function: The callback function
1222            for asynchronous request. (optional)
1223        :param str account_id: The external account number (int) or account ID Guid. (required)
1224        :param str template_id: The ID of the template being accessed. (required)
1225        :param DocumentHtmlDefinition document_html_definition:
1226        :return: DocumentHtmlDefinitions
1227                 If the method is called asynchronously,
1228                 returns the request thread.
1229        """
1230        kwargs['_return_http_data_only'] = True
1231        if kwargs.get('callback'):
1232            return self.create_template_responsive_html_preview_with_http_info(account_id, template_id, **kwargs)
1233        else:
1234            (data) = self.create_template_responsive_html_preview_with_http_info(account_id, template_id, **kwargs)
1235            return data
1236
1237    def create_template_responsive_html_preview_with_http_info(self, account_id, template_id, **kwargs):
1238        """
1239        Get Responsive HTML Preview for all documents in a template.
1240        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents.
1241        This method makes a synchronous HTTP request by default. To make an
1242        asynchronous HTTP request, please define a `callback` function
1243        to be invoked when receiving the response.
1244        >>> def callback_function(response):
1245        >>>     pprint(response)
1246        >>>
1247        >>> thread = api.create_template_responsive_html_preview_with_http_info(account_id, template_id, callback=callback_function)
1248
1249        :param callback function: The callback function
1250            for asynchronous request. (optional)
1251        :param str account_id: The external account number (int) or account ID Guid. (required)
1252        :param str template_id: The ID of the template being accessed. (required)
1253        :param DocumentHtmlDefinition document_html_definition:
1254        :return: DocumentHtmlDefinitions
1255                 If the method is called asynchronously,
1256                 returns the request thread.
1257        """
1258
1259        all_params = ['account_id', 'template_id', 'document_html_definition']
1260        all_params.append('callback')
1261        all_params.append('_return_http_data_only')
1262        all_params.append('_preload_content')
1263        all_params.append('_request_timeout')
1264
1265        params = locals()
1266        for key, val in iteritems(params['kwargs']):
1267            if key not in all_params:
1268                raise TypeError(
1269                    "Got an unexpected keyword argument '%s'"
1270                    " to method create_template_responsive_html_preview" % key
1271                )
1272            params[key] = val
1273        del params['kwargs']
1274        # verify the required parameter 'account_id' is set
1275        if ('account_id' not in params) or (params['account_id'] is None):
1276            raise ValueError("Missing the required parameter `account_id` when calling `create_template_responsive_html_preview`")
1277        # verify the required parameter 'template_id' is set
1278        if ('template_id' not in params) or (params['template_id'] is None):
1279            raise ValueError("Missing the required parameter `template_id` when calling `create_template_responsive_html_preview`")
1280
1281
1282        collection_formats = {}
1283
1284        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/responsive_html_preview'.replace('{format}', 'json')
1285        path_params = {}
1286        if 'account_id' in params:
1287            path_params['accountId'] = params['account_id']
1288        if 'template_id' in params:
1289            path_params['templateId'] = params['template_id']
1290
1291        query_params = {}
1292
1293        header_params = {}
1294
1295        form_params = []
1296        local_var_files = {}
1297
1298        body_params = None
1299        if 'document_html_definition' in params:
1300            body_params = params['document_html_definition']
1301        # HTTP header `Accept`
1302        header_params['Accept'] = self.api_client.\
1303            select_header_accept(['application/json'])
1304
1305        # Authentication setting
1306        auth_settings = []
1307
1308        return self.api_client.call_api(resource_path, 'POST',
1309                                        path_params,
1310                                        query_params,
1311                                        header_params,
1312                                        body=body_params,
1313                                        post_params=form_params,
1314                                        files=local_var_files,
1315                                        response_type='DocumentHtmlDefinitions',
1316                                        auth_settings=auth_settings,
1317                                        callback=params.get('callback'),
1318                                        _return_http_data_only=params.get('_return_http_data_only'),
1319                                        _preload_content=params.get('_preload_content', True),
1320                                        _request_timeout=params.get('_request_timeout'),
1321                                        collection_formats=collection_formats)
1322
1323    def delete_bulk_recipients(self, account_id, recipient_id, template_id, **kwargs):
1324        """
1325        Deletes the bulk recipient list on a template.
1326        Deletes the bulk recipient list on a template.
1327        This method makes a synchronous HTTP request by default. To make an
1328        asynchronous HTTP request, please define a `callback` function
1329        to be invoked when receiving the response.
1330        >>> def callback_function(response):
1331        >>>     pprint(response)
1332        >>>
1333        >>> thread = api.delete_bulk_recipients(account_id, recipient_id, template_id, callback=callback_function)
1334
1335        :param callback function: The callback function
1336            for asynchronous request. (optional)
1337        :param str account_id: The external account number (int) or account ID Guid. (required)
1338        :param str recipient_id: The ID of the recipient being accessed. (required)
1339        :param str template_id: The ID of the template being accessed. (required)
1340        :return: BulkRecipientsUpdateResponse
1341                 If the method is called asynchronously,
1342                 returns the request thread.
1343        """
1344        kwargs['_return_http_data_only'] = True
1345        if kwargs.get('callback'):
1346            return self.delete_bulk_recipients_with_http_info(account_id, recipient_id, template_id, **kwargs)
1347        else:
1348            (data) = self.delete_bulk_recipients_with_http_info(account_id, recipient_id, template_id, **kwargs)
1349            return data
1350
1351    def delete_bulk_recipients_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
1352        """
1353        Deletes the bulk recipient list on a template.
1354        Deletes the bulk recipient list on a template.
1355        This method makes a synchronous HTTP request by default. To make an
1356        asynchronous HTTP request, please define a `callback` function
1357        to be invoked when receiving the response.
1358        >>> def callback_function(response):
1359        >>>     pprint(response)
1360        >>>
1361        >>> thread = api.delete_bulk_recipients_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
1362
1363        :param callback function: The callback function
1364            for asynchronous request. (optional)
1365        :param str account_id: The external account number (int) or account ID Guid. (required)
1366        :param str recipient_id: The ID of the recipient being accessed. (required)
1367        :param str template_id: The ID of the template being accessed. (required)
1368        :return: BulkRecipientsUpdateResponse
1369                 If the method is called asynchronously,
1370                 returns the request thread.
1371        """
1372
1373        all_params = ['account_id', 'recipient_id', 'template_id']
1374        all_params.append('callback')
1375        all_params.append('_return_http_data_only')
1376        all_params.append('_preload_content')
1377        all_params.append('_request_timeout')
1378
1379        params = locals()
1380        for key, val in iteritems(params['kwargs']):
1381            if key not in all_params:
1382                raise TypeError(
1383                    "Got an unexpected keyword argument '%s'"
1384                    " to method delete_bulk_recipients" % key
1385                )
1386            params[key] = val
1387        del params['kwargs']
1388        # verify the required parameter 'account_id' is set
1389        if ('account_id' not in params) or (params['account_id'] is None):
1390            raise ValueError("Missing the required parameter `account_id` when calling `delete_bulk_recipients`")
1391        # verify the required parameter 'recipient_id' is set
1392        if ('recipient_id' not in params) or (params['recipient_id'] is None):
1393            raise ValueError("Missing the required parameter `recipient_id` when calling `delete_bulk_recipients`")
1394        # verify the required parameter 'template_id' is set
1395        if ('template_id' not in params) or (params['template_id'] is None):
1396            raise ValueError("Missing the required parameter `template_id` when calling `delete_bulk_recipients`")
1397
1398
1399        collection_formats = {}
1400
1401        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/bulk_recipients'.replace('{format}', 'json')
1402        path_params = {}
1403        if 'account_id' in params:
1404            path_params['accountId'] = params['account_id']
1405        if 'recipient_id' in params:
1406            path_params['recipientId'] = params['recipient_id']
1407        if 'template_id' in params:
1408            path_params['templateId'] = params['template_id']
1409
1410        query_params = {}
1411
1412        header_params = {}
1413
1414        form_params = []
1415        local_var_files = {}
1416
1417        body_params = None
1418        # HTTP header `Accept`
1419        header_params['Accept'] = self.api_client.\
1420            select_header_accept(['application/json'])
1421
1422        # Authentication setting
1423        auth_settings = []
1424
1425        return self.api_client.call_api(resource_path, 'DELETE',
1426                                        path_params,
1427                                        query_params,
1428                                        header_params,
1429                                        body=body_params,
1430                                        post_params=form_params,
1431                                        files=local_var_files,
1432                                        response_type='BulkRecipientsUpdateResponse',
1433                                        auth_settings=auth_settings,
1434                                        callback=params.get('callback'),
1435                                        _return_http_data_only=params.get('_return_http_data_only'),
1436                                        _preload_content=params.get('_preload_content', True),
1437                                        _request_timeout=params.get('_request_timeout'),
1438                                        collection_formats=collection_formats)
1439
1440    def delete_custom_fields(self, account_id, template_id, **kwargs):
1441        """
1442        Deletes envelope custom fields in a template.
1443        Deletes envelope custom fields in a template.
1444        This method makes a synchronous HTTP request by default. To make an
1445        asynchronous HTTP request, please define a `callback` function
1446        to be invoked when receiving the response.
1447        >>> def callback_function(response):
1448        >>>     pprint(response)
1449        >>>
1450        >>> thread = api.delete_custom_fields(account_id, template_id, callback=callback_function)
1451
1452        :param callback function: The callback function
1453            for asynchronous request. (optional)
1454        :param str account_id: The external account number (int) or account ID Guid. (required)
1455        :param str template_id: The ID of the template being accessed. (required)
1456        :param TemplateCustomFields template_custom_fields:
1457        :return: CustomFields
1458                 If the method is called asynchronously,
1459                 returns the request thread.
1460        """
1461        kwargs['_return_http_data_only'] = True
1462        if kwargs.get('callback'):
1463            return self.delete_custom_fields_with_http_info(account_id, template_id, **kwargs)
1464        else:
1465            (data) = self.delete_custom_fields_with_http_info(account_id, template_id, **kwargs)
1466            return data
1467
1468    def delete_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
1469        """
1470        Deletes envelope custom fields in a template.
1471        Deletes envelope custom fields in a template.
1472        This method makes a synchronous HTTP request by default. To make an
1473        asynchronous HTTP request, please define a `callback` function
1474        to be invoked when receiving the response.
1475        >>> def callback_function(response):
1476        >>>     pprint(response)
1477        >>>
1478        >>> thread = api.delete_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
1479
1480        :param callback function: The callback function
1481            for asynchronous request. (optional)
1482        :param str account_id: The external account number (int) or account ID Guid. (required)
1483        :param str template_id: The ID of the template being accessed. (required)
1484        :param TemplateCustomFields template_custom_fields:
1485        :return: CustomFields
1486                 If the method is called asynchronously,
1487                 returns the request thread.
1488        """
1489
1490        all_params = ['account_id', 'template_id', 'template_custom_fields']
1491        all_params.append('callback')
1492        all_params.append('_return_http_data_only')
1493        all_params.append('_preload_content')
1494        all_params.append('_request_timeout')
1495
1496        params = locals()
1497        for key, val in iteritems(params['kwargs']):
1498            if key not in all_params:
1499                raise TypeError(
1500                    "Got an unexpected keyword argument '%s'"
1501                    " to method delete_custom_fields" % key
1502                )
1503            params[key] = val
1504        del params['kwargs']
1505        # verify the required parameter 'account_id' is set
1506        if ('account_id' not in params) or (params['account_id'] is None):
1507            raise ValueError("Missing the required parameter `account_id` when calling `delete_custom_fields`")
1508        # verify the required parameter 'template_id' is set
1509        if ('template_id' not in params) or (params['template_id'] is None):
1510            raise ValueError("Missing the required parameter `template_id` when calling `delete_custom_fields`")
1511
1512
1513        collection_formats = {}
1514
1515        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
1516        path_params = {}
1517        if 'account_id' in params:
1518            path_params['accountId'] = params['account_id']
1519        if 'template_id' in params:
1520            path_params['templateId'] = params['template_id']
1521
1522        query_params = {}
1523
1524        header_params = {}
1525
1526        form_params = []
1527        local_var_files = {}
1528
1529        body_params = None
1530        if 'template_custom_fields' in params:
1531            body_params = params['template_custom_fields']
1532        # HTTP header `Accept`
1533        header_params['Accept'] = self.api_client.\
1534            select_header_accept(['application/json'])
1535
1536        # Authentication setting
1537        auth_settings = []
1538
1539        return self.api_client.call_api(resource_path, 'DELETE',
1540                                        path_params,
1541                                        query_params,
1542                                        header_params,
1543                                        body=body_params,
1544                                        post_params=form_params,
1545                                        files=local_var_files,
1546                                        response_type='CustomFields',
1547                                        auth_settings=auth_settings,
1548                                        callback=params.get('callback'),
1549                                        _return_http_data_only=params.get('_return_http_data_only'),
1550                                        _preload_content=params.get('_preload_content', True),
1551                                        _request_timeout=params.get('_request_timeout'),
1552                                        collection_formats=collection_formats)
1553
1554    def delete_document_fields(self, account_id, document_id, template_id, **kwargs):
1555        """
1556        Deletes custom document fields from an existing template document.
1557        Deletes custom document fields from an existing template document.
1558        This method makes a synchronous HTTP request by default. To make an
1559        asynchronous HTTP request, please define a `callback` function
1560        to be invoked when receiving the response.
1561        >>> def callback_function(response):
1562        >>>     pprint(response)
1563        >>>
1564        >>> thread = api.delete_document_fields(account_id, document_id, template_id, callback=callback_function)
1565
1566        :param callback function: The callback function
1567            for asynchronous request. (optional)
1568        :param str account_id: The external account number (int) or account ID Guid. (required)
1569        :param str document_id: The ID of the document being accessed. (required)
1570        :param str template_id: The ID of the template being accessed. (required)
1571        :param DocumentFieldsInformation document_fields_information:
1572        :return: DocumentFieldsInformation
1573                 If the method is called asynchronously,
1574                 returns the request thread.
1575        """
1576        kwargs['_return_http_data_only'] = True
1577        if kwargs.get('callback'):
1578            return self.delete_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
1579        else:
1580            (data) = self.delete_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
1581            return data
1582
1583    def delete_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
1584        """
1585        Deletes custom document fields from an existing template document.
1586        Deletes custom document fields from an existing template document.
1587        This method makes a synchronous HTTP request by default. To make an
1588        asynchronous HTTP request, please define a `callback` function
1589        to be invoked when receiving the response.
1590        >>> def callback_function(response):
1591        >>>     pprint(response)
1592        >>>
1593        >>> thread = api.delete_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
1594
1595        :param callback function: The callback function
1596            for asynchronous request. (optional)
1597        :param str account_id: The external account number (int) or account ID Guid. (required)
1598        :param str document_id: The ID of the document being accessed. (required)
1599        :param str template_id: The ID of the template being accessed. (required)
1600        :param DocumentFieldsInformation document_fields_information:
1601        :return: DocumentFieldsInformation
1602                 If the method is called asynchronously,
1603                 returns the request thread.
1604        """
1605
1606        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
1607        all_params.append('callback')
1608        all_params.append('_return_http_data_only')
1609        all_params.append('_preload_content')
1610        all_params.append('_request_timeout')
1611
1612        params = locals()
1613        for key, val in iteritems(params['kwargs']):
1614            if key not in all_params:
1615                raise TypeError(
1616                    "Got an unexpected keyword argument '%s'"
1617                    " to method delete_document_fields" % key
1618                )
1619            params[key] = val
1620        del params['kwargs']
1621        # verify the required parameter 'account_id' is set
1622        if ('account_id' not in params) or (params['account_id'] is None):
1623            raise ValueError("Missing the required parameter `account_id` when calling `delete_document_fields`")
1624        # verify the required parameter 'document_id' is set
1625        if ('document_id' not in params) or (params['document_id'] is None):
1626            raise ValueError("Missing the required parameter `document_id` when calling `delete_document_fields`")
1627        # verify the required parameter 'template_id' is set
1628        if ('template_id' not in params) or (params['template_id'] is None):
1629            raise ValueError("Missing the required parameter `template_id` when calling `delete_document_fields`")
1630
1631
1632        collection_formats = {}
1633
1634        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
1635        path_params = {}
1636        if 'account_id' in params:
1637            path_params['accountId'] = params['account_id']
1638        if 'document_id' in params:
1639            path_params['documentId'] = params['document_id']
1640        if 'template_id' in params:
1641            path_params['templateId'] = params['template_id']
1642
1643        query_params = {}
1644
1645        header_params = {}
1646
1647        form_params = []
1648        local_var_files = {}
1649
1650        body_params = None
1651        if 'document_fields_information' in params:
1652            body_params = params['document_fields_information']
1653        # HTTP header `Accept`
1654        header_params['Accept'] = self.api_client.\
1655            select_header_accept(['application/json'])
1656
1657        # Authentication setting
1658        auth_settings = []
1659
1660        return self.api_client.call_api(resource_path, 'DELETE',
1661                                        path_params,
1662                                        query_params,
1663                                        header_params,
1664                                        body=body_params,
1665                                        post_params=form_params,
1666                                        files=local_var_files,
1667                                        response_type='DocumentFieldsInformation',
1668                                        auth_settings=auth_settings,
1669                                        callback=params.get('callback'),
1670                                        _return_http_data_only=params.get('_return_http_data_only'),
1671                                        _preload_content=params.get('_preload_content', True),
1672                                        _request_timeout=params.get('_request_timeout'),
1673                                        collection_formats=collection_formats)
1674
1675    def delete_document_page(self, account_id, document_id, page_number, template_id, **kwargs):
1676        """
1677        Deletes a page from a document in an template.
1678        Deletes a page from a document in a template based on the page number.
1679        This method makes a synchronous HTTP request by default. To make an
1680        asynchronous HTTP request, please define a `callback` function
1681        to be invoked when receiving the response.
1682        >>> def callback_function(response):
1683        >>>     pprint(response)
1684        >>>
1685        >>> thread = api.delete_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
1686
1687        :param callback function: The callback function
1688            for asynchronous request. (optional)
1689        :param str account_id: The external account number (int) or account ID Guid. (required)
1690        :param str document_id: The ID of the document being accessed. (required)
1691        :param str page_number: The page number being accessed. (required)
1692        :param str template_id: The ID of the template being accessed. (required)
1693        :param PageRequest page_request:
1694        :return: None
1695                 If the method is called asynchronously,
1696                 returns the request thread.
1697        """
1698        kwargs['_return_http_data_only'] = True
1699        if kwargs.get('callback'):
1700            return self.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
1701        else:
1702            (data) = self.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
1703            return data
1704
1705    def delete_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
1706        """
1707        Deletes a page from a document in an template.
1708        Deletes a page from a document in a template based on the page number.
1709        This method makes a synchronous HTTP request by default. To make an
1710        asynchronous HTTP request, please define a `callback` function
1711        to be invoked when receiving the response.
1712        >>> def callback_function(response):
1713        >>>     pprint(response)
1714        >>>
1715        >>> thread = api.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
1716
1717        :param callback function: The callback function
1718            for asynchronous request. (optional)
1719        :param str account_id: The external account number (int) or account ID Guid. (required)
1720        :param str document_id: The ID of the document being accessed. (required)
1721        :param str page_number: The page number being accessed. (required)
1722        :param str template_id: The ID of the template being accessed. (required)
1723        :param PageRequest page_request:
1724        :return: None
1725                 If the method is called asynchronously,
1726                 returns the request thread.
1727        """
1728
1729        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request']
1730        all_params.append('callback')
1731        all_params.append('_return_http_data_only')
1732        all_params.append('_preload_content')
1733        all_params.append('_request_timeout')
1734
1735        params = locals()
1736        for key, val in iteritems(params['kwargs']):
1737            if key not in all_params:
1738                raise TypeError(
1739                    "Got an unexpected keyword argument '%s'"
1740                    " to method delete_document_page" % key
1741                )
1742            params[key] = val
1743        del params['kwargs']
1744        # verify the required parameter 'account_id' is set
1745        if ('account_id' not in params) or (params['account_id'] is None):
1746            raise ValueError("Missing the required parameter `account_id` when calling `delete_document_page`")
1747        # verify the required parameter 'document_id' is set
1748        if ('document_id' not in params) or (params['document_id'] is None):
1749            raise ValueError("Missing the required parameter `document_id` when calling `delete_document_page`")
1750        # verify the required parameter 'page_number' is set
1751        if ('page_number' not in params) or (params['page_number'] is None):
1752            raise ValueError("Missing the required parameter `page_number` when calling `delete_document_page`")
1753        # verify the required parameter 'template_id' is set
1754        if ('template_id' not in params) or (params['template_id'] is None):
1755            raise ValueError("Missing the required parameter `template_id` when calling `delete_document_page`")
1756
1757
1758        collection_formats = {}
1759
1760        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}'.replace('{format}', 'json')
1761        path_params = {}
1762        if 'account_id' in params:
1763            path_params['accountId'] = params['account_id']
1764        if 'document_id' in params:
1765            path_params['documentId'] = params['document_id']
1766        if 'page_number' in params:
1767            path_params['pageNumber'] = params['page_number']
1768        if 'template_id' in params:
1769            path_params['templateId'] = params['template_id']
1770
1771        query_params = {}
1772
1773        header_params = {}
1774
1775        form_params = []
1776        local_var_files = {}
1777
1778        body_params = None
1779        if 'page_request' in params:
1780            body_params = params['page_request']
1781        # HTTP header `Accept`
1782        header_params['Accept'] = self.api_client.\
1783            select_header_accept(['application/json'])
1784
1785        # Authentication setting
1786        auth_settings = []
1787
1788        return self.api_client.call_api(resource_path, 'DELETE',
1789                                        path_params,
1790                                        query_params,
1791                                        header_params,
1792                                        body=body_params,
1793                                        post_params=form_params,
1794                                        files=local_var_files,
1795                                        response_type=None,
1796                                        auth_settings=auth_settings,
1797                                        callback=params.get('callback'),
1798                                        _return_http_data_only=params.get('_return_http_data_only'),
1799                                        _preload_content=params.get('_preload_content', True),
1800                                        _request_timeout=params.get('_request_timeout'),
1801                                        collection_formats=collection_formats)
1802
1803    def delete_documents(self, account_id, template_id, **kwargs):
1804        """
1805        Deletes documents from a template.
1806        Deletes one or more documents from an existing template.
1807        This method makes a synchronous HTTP request by default. To make an
1808        asynchronous HTTP request, please define a `callback` function
1809        to be invoked when receiving the response.
1810        >>> def callback_function(response):
1811        >>>     pprint(response)
1812        >>>
1813        >>> thread = api.delete_documents(account_id, template_id, callback=callback_function)
1814
1815        :param callback function: The callback function
1816            for asynchronous request. (optional)
1817        :param str account_id: The external account number (int) or account ID Guid. (required)
1818        :param str template_id: The ID of the template being accessed. (required)
1819        :param EnvelopeDefinition envelope_definition:
1820        :return: TemplateDocumentsResult
1821                 If the method is called asynchronously,
1822                 returns the request thread.
1823        """
1824        kwargs['_return_http_data_only'] = True
1825        if kwargs.get('callback'):
1826            return self.delete_documents_with_http_info(account_id, template_id, **kwargs)
1827        else:
1828            (data) = self.delete_documents_with_http_info(account_id, template_id, **kwargs)
1829            return data
1830
1831    def delete_documents_with_http_info(self, account_id, template_id, **kwargs):
1832        """
1833        Deletes documents from a template.
1834        Deletes one or more documents from an existing template.
1835        This method makes a synchronous HTTP request by default. To make an
1836        asynchronous HTTP request, please define a `callback` function
1837        to be invoked when receiving the response.
1838        >>> def callback_function(response):
1839        >>>     pprint(response)
1840        >>>
1841        >>> thread = api.delete_documents_with_http_info(account_id, template_id, callback=callback_function)
1842
1843        :param callback function: The callback function
1844            for asynchronous request. (optional)
1845        :param str account_id: The external account number (int) or account ID Guid. (required)
1846        :param str template_id: The ID of the template being accessed. (required)
1847        :param EnvelopeDefinition envelope_definition:
1848        :return: TemplateDocumentsResult
1849                 If the method is called asynchronously,
1850                 returns the request thread.
1851        """
1852
1853        all_params = ['account_id', 'template_id', 'envelope_definition']
1854        all_params.append('callback')
1855        all_params.append('_return_http_data_only')
1856        all_params.append('_preload_content')
1857        all_params.append('_request_timeout')
1858
1859        params = locals()
1860        for key, val in iteritems(params['kwargs']):
1861            if key not in all_params:
1862                raise TypeError(
1863                    "Got an unexpected keyword argument '%s'"
1864                    " to method delete_documents" % key
1865                )
1866            params[key] = val
1867        del params['kwargs']
1868        # verify the required parameter 'account_id' is set
1869        if ('account_id' not in params) or (params['account_id'] is None):
1870            raise ValueError("Missing the required parameter `account_id` when calling `delete_documents`")
1871        # verify the required parameter 'template_id' is set
1872        if ('template_id' not in params) or (params['template_id'] is None):
1873            raise ValueError("Missing the required parameter `template_id` when calling `delete_documents`")
1874
1875
1876        collection_formats = {}
1877
1878        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
1879        path_params = {}
1880        if 'account_id' in params:
1881            path_params['accountId'] = params['account_id']
1882        if 'template_id' in params:
1883            path_params['templateId'] = params['template_id']
1884
1885        query_params = {}
1886
1887        header_params = {}
1888
1889        form_params = []
1890        local_var_files = {}
1891
1892        body_params = None
1893        if 'envelope_definition' in params:
1894            body_params = params['envelope_definition']
1895        # HTTP header `Accept`
1896        header_params['Accept'] = self.api_client.\
1897            select_header_accept(['application/json'])
1898
1899        # Authentication setting
1900        auth_settings = []
1901
1902        return self.api_client.call_api(resource_path, 'DELETE',
1903                                        path_params,
1904                                        query_params,
1905                                        header_params,
1906                                        body=body_params,
1907                                        post_params=form_params,
1908                                        files=local_var_files,
1909                                        response_type='TemplateDocumentsResult',
1910                                        auth_settings=auth_settings,
1911                                        callback=params.get('callback'),
1912                                        _return_http_data_only=params.get('_return_http_data_only'),
1913                                        _preload_content=params.get('_preload_content', True),
1914                                        _request_timeout=params.get('_request_timeout'),
1915                                        collection_formats=collection_formats)
1916
1917    def delete_group_share(self, account_id, template_id, template_part, **kwargs):
1918        """
1919        Removes a member group's sharing permissions for a template.
1920        Removes a member group's sharing permissions for a specified template.
1921        This method makes a synchronous HTTP request by default. To make an
1922        asynchronous HTTP request, please define a `callback` function
1923        to be invoked when receiving the response.
1924        >>> def callback_function(response):
1925        >>>     pprint(response)
1926        >>>
1927        >>> thread = api.delete_group_share(account_id, template_id, template_part, callback=callback_function)
1928
1929        :param callback function: The callback function
1930            for asynchronous request. (optional)
1931        :param str account_id: The external account number (int) or account ID Guid. (required)
1932        :param str template_id: The ID of the template being accessed. (required)
1933        :param str template_part: Currently, the only defined part is **groups**. (required)
1934        :param GroupInformation group_information:
1935        :return: GroupInformation
1936                 If the method is called asynchronously,
1937                 returns the request thread.
1938        """
1939        kwargs['_return_http_data_only'] = True
1940        if kwargs.get('callback'):
1941            return self.delete_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
1942        else:
1943            (data) = self.delete_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
1944            return data
1945
1946    def delete_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs):
1947        """
1948        Removes a member group's sharing permissions for a template.
1949        Removes a member group's sharing permissions for a specified template.
1950        This method makes a synchronous HTTP request by default. To make an
1951        asynchronous HTTP request, please define a `callback` function
1952        to be invoked when receiving the response.
1953        >>> def callback_function(response):
1954        >>>     pprint(response)
1955        >>>
1956        >>> thread = api.delete_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
1957
1958        :param callback function: The callback function
1959            for asynchronous request. (optional)
1960        :param str account_id: The external account number (int) or account ID Guid. (required)
1961        :param str template_id: The ID of the template being accessed. (required)
1962        :param str template_part: Currently, the only defined part is **groups**. (required)
1963        :param GroupInformation group_information:
1964        :return: GroupInformation
1965                 If the method is called asynchronously,
1966                 returns the request thread.
1967        """
1968
1969        all_params = ['account_id', 'template_id', 'template_part', 'group_information']
1970        all_params.append('callback')
1971        all_params.append('_return_http_data_only')
1972        all_params.append('_preload_content')
1973        all_params.append('_request_timeout')
1974
1975        params = locals()
1976        for key, val in iteritems(params['kwargs']):
1977            if key not in all_params:
1978                raise TypeError(
1979                    "Got an unexpected keyword argument '%s'"
1980                    " to method delete_group_share" % key
1981                )
1982            params[key] = val
1983        del params['kwargs']
1984        # verify the required parameter 'account_id' is set
1985        if ('account_id' not in params) or (params['account_id'] is None):
1986            raise ValueError("Missing the required parameter `account_id` when calling `delete_group_share`")
1987        # verify the required parameter 'template_id' is set
1988        if ('template_id' not in params) or (params['template_id'] is None):
1989            raise ValueError("Missing the required parameter `template_id` when calling `delete_group_share`")
1990        # verify the required parameter 'template_part' is set
1991        if ('template_part' not in params) or (params['template_part'] is None):
1992            raise ValueError("Missing the required parameter `template_part` when calling `delete_group_share`")
1993
1994
1995        collection_formats = {}
1996
1997        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json')
1998        path_params = {}
1999        if 'account_id' in params:
2000            path_params['accountId'] = params['account_id']
2001        if 'template_id' in params:
2002            path_params['templateId'] = params['template_id']
2003        if 'template_part' in params:
2004            path_params['templatePart'] = params['template_part']
2005
2006        query_params = {}
2007
2008        header_params = {}
2009
2010        form_params = []
2011        local_var_files = {}
2012
2013        body_params = None
2014        if 'group_information' in params:
2015            body_params = params['group_information']
2016        # HTTP header `Accept`
2017        header_params['Accept'] = self.api_client.\
2018            select_header_accept(['application/json'])
2019
2020        # Authentication setting
2021        auth_settings = []
2022
2023        return self.api_client.call_api(resource_path, 'DELETE',
2024                                        path_params,
2025                                        query_params,
2026                                        header_params,
2027                                        body=body_params,
2028                                        post_params=form_params,
2029                                        files=local_var_files,
2030                                        response_type='GroupInformation',
2031                                        auth_settings=auth_settings,
2032                                        callback=params.get('callback'),
2033                                        _return_http_data_only=params.get('_return_http_data_only'),
2034                                        _preload_content=params.get('_preload_content', True),
2035                                        _request_timeout=params.get('_request_timeout'),
2036                                        collection_formats=collection_formats)
2037
2038    def delete_lock(self, account_id, template_id, **kwargs):
2039        """
2040        Deletes a template lock.
2041        Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request.
2042        This method makes a synchronous HTTP request by default. To make an
2043        asynchronous HTTP request, please define a `callback` function
2044        to be invoked when receiving the response.
2045        >>> def callback_function(response):
2046        >>>     pprint(response)
2047        >>>
2048        >>> thread = api.delete_lock(account_id, template_id, callback=callback_function)
2049
2050        :param callback function: The callback function
2051            for asynchronous request. (optional)
2052        :param str account_id: The external account number (int) or account ID Guid. (required)
2053        :param str template_id: The ID of the template being accessed. (required)
2054        :param LockRequest lock_request:
2055        :return: LockInformation
2056                 If the method is called asynchronously,
2057                 returns the request thread.
2058        """
2059        kwargs['_return_http_data_only'] = True
2060        if kwargs.get('callback'):
2061            return self.delete_lock_with_http_info(account_id, template_id, **kwargs)
2062        else:
2063            (data) = self.delete_lock_with_http_info(account_id, template_id, **kwargs)
2064            return data
2065
2066    def delete_lock_with_http_info(self, account_id, template_id, **kwargs):
2067        """
2068        Deletes a template lock.
2069        Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request.
2070        This method makes a synchronous HTTP request by default. To make an
2071        asynchronous HTTP request, please define a `callback` function
2072        to be invoked when receiving the response.
2073        >>> def callback_function(response):
2074        >>>     pprint(response)
2075        >>>
2076        >>> thread = api.delete_lock_with_http_info(account_id, template_id, callback=callback_function)
2077
2078        :param callback function: The callback function
2079            for asynchronous request. (optional)
2080        :param str account_id: The external account number (int) or account ID Guid. (required)
2081        :param str template_id: The ID of the template being accessed. (required)
2082        :param LockRequest lock_request:
2083        :return: LockInformation
2084                 If the method is called asynchronously,
2085                 returns the request thread.
2086        """
2087
2088        all_params = ['account_id', 'template_id', 'lock_request']
2089        all_params.append('callback')
2090        all_params.append('_return_http_data_only')
2091        all_params.append('_preload_content')
2092        all_params.append('_request_timeout')
2093
2094        params = locals()
2095        for key, val in iteritems(params['kwargs']):
2096            if key not in all_params:
2097                raise TypeError(
2098                    "Got an unexpected keyword argument '%s'"
2099                    " to method delete_lock" % key
2100                )
2101            params[key] = val
2102        del params['kwargs']
2103        # verify the required parameter 'account_id' is set
2104        if ('account_id' not in params) or (params['account_id'] is None):
2105            raise ValueError("Missing the required parameter `account_id` when calling `delete_lock`")
2106        # verify the required parameter 'template_id' is set
2107        if ('template_id' not in params) or (params['template_id'] is None):
2108            raise ValueError("Missing the required parameter `template_id` when calling `delete_lock`")
2109
2110
2111        collection_formats = {}
2112
2113        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
2114        path_params = {}
2115        if 'account_id' in params:
2116            path_params['accountId'] = params['account_id']
2117        if 'template_id' in params:
2118            path_params['templateId'] = params['template_id']
2119
2120        query_params = {}
2121
2122        header_params = {}
2123
2124        form_params = []
2125        local_var_files = {}
2126
2127        body_params = None
2128        if 'lock_request' in params:
2129            body_params = params['lock_request']
2130        # HTTP header `Accept`
2131        header_params['Accept'] = self.api_client.\
2132            select_header_accept(['application/json'])
2133
2134        # Authentication setting
2135        auth_settings = []
2136
2137        return self.api_client.call_api(resource_path, 'DELETE',
2138                                        path_params,
2139                                        query_params,
2140                                        header_params,
2141                                        body=body_params,
2142                                        post_params=form_params,
2143                                        files=local_var_files,
2144                                        response_type='LockInformation',
2145                                        auth_settings=auth_settings,
2146                                        callback=params.get('callback'),
2147                                        _return_http_data_only=params.get('_return_http_data_only'),
2148                                        _preload_content=params.get('_preload_content', True),
2149                                        _request_timeout=params.get('_request_timeout'),
2150                                        collection_formats=collection_formats)
2151
2152    def delete_recipient(self, account_id, recipient_id, template_id, **kwargs):
2153        """
2154        Deletes the specified recipient file from a template.
2155        Deletes the specified recipient file from the specified template.
2156        This method makes a synchronous HTTP request by default. To make an
2157        asynchronous HTTP request, please define a `callback` function
2158        to be invoked when receiving the response.
2159        >>> def callback_function(response):
2160        >>>     pprint(response)
2161        >>>
2162        >>> thread = api.delete_recipient(account_id, recipient_id, template_id, callback=callback_function)
2163
2164        :param callback function: The callback function
2165            for asynchronous request. (optional)
2166        :param str account_id: The external account number (int) or account ID Guid. (required)
2167        :param str recipient_id: The ID of the recipient being accessed. (required)
2168        :param str template_id: The ID of the template being accessed. (required)
2169        :param TemplateRecipients template_recipients:
2170        :return: Recipients
2171                 If the method is called asynchronously,
2172                 returns the request thread.
2173        """
2174        kwargs['_return_http_data_only'] = True
2175        if kwargs.get('callback'):
2176            return self.delete_recipient_with_http_info(account_id, recipient_id, template_id, **kwargs)
2177        else:
2178            (data) = self.delete_recipient_with_http_info(account_id, recipient_id, template_id, **kwargs)
2179            return data
2180
2181    def delete_recipient_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
2182        """
2183        Deletes the specified recipient file from a template.
2184        Deletes the specified recipient file from the specified template.
2185        This method makes a synchronous HTTP request by default. To make an
2186        asynchronous HTTP request, please define a `callback` function
2187        to be invoked when receiving the response.
2188        >>> def callback_function(response):
2189        >>>     pprint(response)
2190        >>>
2191        >>> thread = api.delete_recipient_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
2192
2193        :param callback function: The callback function
2194            for asynchronous request. (optional)
2195        :param str account_id: The external account number (int) or account ID Guid. (required)
2196        :param str recipient_id: The ID of the recipient being accessed. (required)
2197        :param str template_id: The ID of the template being accessed. (required)
2198        :param TemplateRecipients template_recipients:
2199        :return: Recipients
2200                 If the method is called asynchronously,
2201                 returns the request thread.
2202        """
2203
2204        all_params = ['account_id', 'recipient_id', 'template_id', 'template_recipients']
2205        all_params.append('callback')
2206        all_params.append('_return_http_data_only')
2207        all_params.append('_preload_content')
2208        all_params.append('_request_timeout')
2209
2210        params = locals()
2211        for key, val in iteritems(params['kwargs']):
2212            if key not in all_params:
2213                raise TypeError(
2214                    "Got an unexpected keyword argument '%s'"
2215                    " to method delete_recipient" % key
2216                )
2217            params[key] = val
2218        del params['kwargs']
2219        # verify the required parameter 'account_id' is set
2220        if ('account_id' not in params) or (params['account_id'] is None):
2221            raise ValueError("Missing the required parameter `account_id` when calling `delete_recipient`")
2222        # verify the required parameter 'recipient_id' is set
2223        if ('recipient_id' not in params) or (params['recipient_id'] is None):
2224            raise ValueError("Missing the required parameter `recipient_id` when calling `delete_recipient`")
2225        # verify the required parameter 'template_id' is set
2226        if ('template_id' not in params) or (params['template_id'] is None):
2227            raise ValueError("Missing the required parameter `template_id` when calling `delete_recipient`")
2228
2229
2230        collection_formats = {}
2231
2232        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}'.replace('{format}', 'json')
2233        path_params = {}
2234        if 'account_id' in params:
2235            path_params['accountId'] = params['account_id']
2236        if 'recipient_id' in params:
2237            path_params['recipientId'] = params['recipient_id']
2238        if 'template_id' in params:
2239            path_params['templateId'] = params['template_id']
2240
2241        query_params = {}
2242
2243        header_params = {}
2244
2245        form_params = []
2246        local_var_files = {}
2247
2248        body_params = None
2249        if 'template_recipients' in params:
2250            body_params = params['template_recipients']
2251        # HTTP header `Accept`
2252        header_params['Accept'] = self.api_client.\
2253            select_header_accept(['application/json'])
2254
2255        # Authentication setting
2256        auth_settings = []
2257
2258        return self.api_client.call_api(resource_path, 'DELETE',
2259                                        path_params,
2260                                        query_params,
2261                                        header_params,
2262                                        body=body_params,
2263                                        post_params=form_params,
2264                                        files=local_var_files,
2265                                        response_type='Recipients',
2266                                        auth_settings=auth_settings,
2267                                        callback=params.get('callback'),
2268                                        _return_http_data_only=params.get('_return_http_data_only'),
2269                                        _preload_content=params.get('_preload_content', True),
2270                                        _request_timeout=params.get('_request_timeout'),
2271                                        collection_formats=collection_formats)
2272
2273    def delete_recipients(self, account_id, template_id, **kwargs):
2274        """
2275        Deletes recipients from a template.
2276        Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients.
2277        This method makes a synchronous HTTP request by default. To make an
2278        asynchronous HTTP request, please define a `callback` function
2279        to be invoked when receiving the response.
2280        >>> def callback_function(response):
2281        >>>     pprint(response)
2282        >>>
2283        >>> thread = api.delete_recipients(account_id, template_id, callback=callback_function)
2284
2285        :param callback function: The callback function
2286            for asynchronous request. (optional)
2287        :param str account_id: The external account number (int) or account ID Guid. (required)
2288        :param str template_id: The ID of the template being accessed. (required)
2289        :param TemplateRecipients template_recipients:
2290        :return: Recipients
2291                 If the method is called asynchronously,
2292                 returns the request thread.
2293        """
2294        kwargs['_return_http_data_only'] = True
2295        if kwargs.get('callback'):
2296            return self.delete_recipients_with_http_info(account_id, template_id, **kwargs)
2297        else:
2298            (data) = self.delete_recipients_with_http_info(account_id, template_id, **kwargs)
2299            return data
2300
2301    def delete_recipients_with_http_info(self, account_id, template_id, **kwargs):
2302        """
2303        Deletes recipients from a template.
2304        Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients.
2305        This method makes a synchronous HTTP request by default. To make an
2306        asynchronous HTTP request, please define a `callback` function
2307        to be invoked when receiving the response.
2308        >>> def callback_function(response):
2309        >>>     pprint(response)
2310        >>>
2311        >>> thread = api.delete_recipients_with_http_info(account_id, template_id, callback=callback_function)
2312
2313        :param callback function: The callback function
2314            for asynchronous request. (optional)
2315        :param str account_id: The external account number (int) or account ID Guid. (required)
2316        :param str template_id: The ID of the template being accessed. (required)
2317        :param TemplateRecipients template_recipients:
2318        :return: Recipients
2319                 If the method is called asynchronously,
2320                 returns the request thread.
2321        """
2322
2323        all_params = ['account_id', 'template_id', 'template_recipients']
2324        all_params.append('callback')
2325        all_params.append('_return_http_data_only')
2326        all_params.append('_preload_content')
2327        all_params.append('_request_timeout')
2328
2329        params = locals()
2330        for key, val in iteritems(params['kwargs']):
2331            if key not in all_params:
2332                raise TypeError(
2333                    "Got an unexpected keyword argument '%s'"
2334                    " to method delete_recipients" % key
2335                )
2336            params[key] = val
2337        del params['kwargs']
2338        # verify the required parameter 'account_id' is set
2339        if ('account_id' not in params) or (params['account_id'] is None):
2340            raise ValueError("Missing the required parameter `account_id` when calling `delete_recipients`")
2341        # verify the required parameter 'template_id' is set
2342        if ('template_id' not in params) or (params['template_id'] is None):
2343            raise ValueError("Missing the required parameter `template_id` when calling `delete_recipients`")
2344
2345
2346        collection_formats = {}
2347
2348        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
2349        path_params = {}
2350        if 'account_id' in params:
2351            path_params['accountId'] = params['account_id']
2352        if 'template_id' in params:
2353            path_params['templateId'] = params['template_id']
2354
2355        query_params = {}
2356
2357        header_params = {}
2358
2359        form_params = []
2360        local_var_files = {}
2361
2362        body_params = None
2363        if 'template_recipients' in params:
2364            body_params = params['template_recipients']
2365        # HTTP header `Accept`
2366        header_params['Accept'] = self.api_client.\
2367            select_header_accept(['application/json'])
2368
2369        # Authentication setting
2370        auth_settings = []
2371
2372        return self.api_client.call_api(resource_path, 'DELETE',
2373                                        path_params,
2374                                        query_params,
2375                                        header_params,
2376                                        body=body_params,
2377                                        post_params=form_params,
2378                                        files=local_var_files,
2379                                        response_type='Recipients',
2380                                        auth_settings=auth_settings,
2381                                        callback=params.get('callback'),
2382                                        _return_http_data_only=params.get('_return_http_data_only'),
2383                                        _preload_content=params.get('_preload_content', True),
2384                                        _request_timeout=params.get('_request_timeout'),
2385                                        collection_formats=collection_formats)
2386
2387    def delete_tabs(self, account_id, recipient_id, template_id, **kwargs):
2388        """
2389        Deletes the tabs associated with a recipient in a template.
2390        Deletes one or more tabs associated with a recipient in a template.
2391        This method makes a synchronous HTTP request by default. To make an
2392        asynchronous HTTP request, please define a `callback` function
2393        to be invoked when receiving the response.
2394        >>> def callback_function(response):
2395        >>>     pprint(response)
2396        >>>
2397        >>> thread = api.delete_tabs(account_id, recipient_id, template_id, callback=callback_function)
2398
2399        :param callback function: The callback function
2400            for asynchronous request. (optional)
2401        :param str account_id: The external account number (int) or account ID Guid. (required)
2402        :param str recipient_id: The ID of the recipient being accessed. (required)
2403        :param str template_id: The ID of the template being accessed. (required)
2404        :param TemplateTabs template_tabs:
2405        :return: Tabs
2406                 If the method is called asynchronously,
2407                 returns the request thread.
2408        """
2409        kwargs['_return_http_data_only'] = True
2410        if kwargs.get('callback'):
2411            return self.delete_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
2412        else:
2413            (data) = self.delete_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
2414            return data
2415
2416    def delete_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
2417        """
2418        Deletes the tabs associated with a recipient in a template.
2419        Deletes one or more tabs associated with a recipient in a template.
2420        This method makes a synchronous HTTP request by default. To make an
2421        asynchronous HTTP request, please define a `callback` function
2422        to be invoked when receiving the response.
2423        >>> def callback_function(response):
2424        >>>     pprint(response)
2425        >>>
2426        >>> thread = api.delete_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
2427
2428        :param callback function: The callback function
2429            for asynchronous request. (optional)
2430        :param str account_id: The external account number (int) or account ID Guid. (required)
2431        :param str recipient_id: The ID of the recipient being accessed. (required)
2432        :param str template_id: The ID of the template being accessed. (required)
2433        :param TemplateTabs template_tabs:
2434        :return: Tabs
2435                 If the method is called asynchronously,
2436                 returns the request thread.
2437        """
2438
2439        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
2440        all_params.append('callback')
2441        all_params.append('_return_http_data_only')
2442        all_params.append('_preload_content')
2443        all_params.append('_request_timeout')
2444
2445        params = locals()
2446        for key, val in iteritems(params['kwargs']):
2447            if key not in all_params:
2448                raise TypeError(
2449                    "Got an unexpected keyword argument '%s'"
2450                    " to method delete_tabs" % key
2451                )
2452            params[key] = val
2453        del params['kwargs']
2454        # verify the required parameter 'account_id' is set
2455        if ('account_id' not in params) or (params['account_id'] is None):
2456            raise ValueError("Missing the required parameter `account_id` when calling `delete_tabs`")
2457        # verify the required parameter 'recipient_id' is set
2458        if ('recipient_id' not in params) or (params['recipient_id'] is None):
2459            raise ValueError("Missing the required parameter `recipient_id` when calling `delete_tabs`")
2460        # verify the required parameter 'template_id' is set
2461        if ('template_id' not in params) or (params['template_id'] is None):
2462            raise ValueError("Missing the required parameter `template_id` when calling `delete_tabs`")
2463
2464
2465        collection_formats = {}
2466
2467        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
2468        path_params = {}
2469        if 'account_id' in params:
2470            path_params['accountId'] = params['account_id']
2471        if 'recipient_id' in params:
2472            path_params['recipientId'] = params['recipient_id']
2473        if 'template_id' in params:
2474            path_params['templateId'] = params['template_id']
2475
2476        query_params = {}
2477
2478        header_params = {}
2479
2480        form_params = []
2481        local_var_files = {}
2482
2483        body_params = None
2484        if 'template_tabs' in params:
2485            body_params = params['template_tabs']
2486        # HTTP header `Accept`
2487        header_params['Accept'] = self.api_client.\
2488            select_header_accept(['application/json'])
2489
2490        # Authentication setting
2491        auth_settings = []
2492
2493        return self.api_client.call_api(resource_path, 'DELETE',
2494                                        path_params,
2495                                        query_params,
2496                                        header_params,
2497                                        body=body_params,
2498                                        post_params=form_params,
2499                                        files=local_var_files,
2500                                        response_type='Tabs',
2501                                        auth_settings=auth_settings,
2502                                        callback=params.get('callback'),
2503                                        _return_http_data_only=params.get('_return_http_data_only'),
2504                                        _preload_content=params.get('_preload_content', True),
2505                                        _request_timeout=params.get('_request_timeout'),
2506                                        collection_formats=collection_formats)
2507
2508    def delete_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
2509        """
2510        Deletes tabs from an envelope document
2511        Deletes tabs from the document specified by `documentId` in the template specified by `templateId`. 
2512        This method makes a synchronous HTTP request by default. To make an
2513        asynchronous HTTP request, please define a `callback` function
2514        to be invoked when receiving the response.
2515        >>> def callback_function(response):
2516        >>>     pprint(response)
2517        >>>
2518        >>> thread = api.delete_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
2519
2520        :param callback function: The callback function
2521            for asynchronous request. (optional)
2522        :param str account_id: The external account number (int) or account ID Guid. (required)
2523        :param str document_id: The ID of the document being accessed. (required)
2524        :param str template_id: The ID of the template being accessed. (required)
2525        :param TemplateTabs template_tabs:
2526        :return: Tabs
2527                 If the method is called asynchronously,
2528                 returns the request thread.
2529        """
2530        kwargs['_return_http_data_only'] = True
2531        if kwargs.get('callback'):
2532            return self.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2533        else:
2534            (data) = self.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2535            return data
2536
2537    def delete_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
2538        """
2539        Deletes tabs from an envelope document
2540        Deletes tabs from the document specified by `documentId` in the template specified by `templateId`. 
2541        This method makes a synchronous HTTP request by default. To make an
2542        asynchronous HTTP request, please define a `callback` function
2543        to be invoked when receiving the response.
2544        >>> def callback_function(response):
2545        >>>     pprint(response)
2546        >>>
2547        >>> thread = api.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
2548
2549        :param callback function: The callback function
2550            for asynchronous request. (optional)
2551        :param str account_id: The external account number (int) or account ID Guid. (required)
2552        :param str document_id: The ID of the document being accessed. (required)
2553        :param str template_id: The ID of the template being accessed. (required)
2554        :param TemplateTabs template_tabs:
2555        :return: Tabs
2556                 If the method is called asynchronously,
2557                 returns the request thread.
2558        """
2559
2560        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
2561        all_params.append('callback')
2562        all_params.append('_return_http_data_only')
2563        all_params.append('_preload_content')
2564        all_params.append('_request_timeout')
2565
2566        params = locals()
2567        for key, val in iteritems(params['kwargs']):
2568            if key not in all_params:
2569                raise TypeError(
2570                    "Got an unexpected keyword argument '%s'"
2571                    " to method delete_template_document_tabs" % key
2572                )
2573            params[key] = val
2574        del params['kwargs']
2575        # verify the required parameter 'account_id' is set
2576        if ('account_id' not in params) or (params['account_id'] is None):
2577            raise ValueError("Missing the required parameter `account_id` when calling `delete_template_document_tabs`")
2578        # verify the required parameter 'document_id' is set
2579        if ('document_id' not in params) or (params['document_id'] is None):
2580            raise ValueError("Missing the required parameter `document_id` when calling `delete_template_document_tabs`")
2581        # verify the required parameter 'template_id' is set
2582        if ('template_id' not in params) or (params['template_id'] is None):
2583            raise ValueError("Missing the required parameter `template_id` when calling `delete_template_document_tabs`")
2584
2585
2586        collection_formats = {}
2587
2588        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
2589        path_params = {}
2590        if 'account_id' in params:
2591            path_params['accountId'] = params['account_id']
2592        if 'document_id' in params:
2593            path_params['documentId'] = params['document_id']
2594        if 'template_id' in params:
2595            path_params['templateId'] = params['template_id']
2596
2597        query_params = {}
2598
2599        header_params = {}
2600
2601        form_params = []
2602        local_var_files = {}
2603
2604        body_params = None
2605        if 'template_tabs' in params:
2606            body_params = params['template_tabs']
2607        # HTTP header `Accept`
2608        header_params['Accept'] = self.api_client.\
2609            select_header_accept(['application/json'])
2610
2611        # Authentication setting
2612        auth_settings = []
2613
2614        return self.api_client.call_api(resource_path, 'DELETE',
2615                                        path_params,
2616                                        query_params,
2617                                        header_params,
2618                                        body=body_params,
2619                                        post_params=form_params,
2620                                        files=local_var_files,
2621                                        response_type='Tabs',
2622                                        auth_settings=auth_settings,
2623                                        callback=params.get('callback'),
2624                                        _return_http_data_only=params.get('_return_http_data_only'),
2625                                        _preload_content=params.get('_preload_content', True),
2626                                        _request_timeout=params.get('_request_timeout'),
2627                                        collection_formats=collection_formats)
2628
2629    def get(self, account_id, template_id, **kwargs):
2630        """
2631        Gets a list of templates for a specified account.
2632        Retrieves the definition of the specified template.
2633        This method makes a synchronous HTTP request by default. To make an
2634        asynchronous HTTP request, please define a `callback` function
2635        to be invoked when receiving the response.
2636        >>> def callback_function(response):
2637        >>>     pprint(response)
2638        >>>
2639        >>> thread = api.get(account_id, template_id, callback=callback_function)
2640
2641        :param callback function: The callback function
2642            for asynchronous request. (optional)
2643        :param str account_id: The external account number (int) or account ID Guid. (required)
2644        :param str template_id: The ID of the template being accessed. (required)
2645        :param str include:
2646        :return: EnvelopeTemplate
2647                 If the method is called asynchronously,
2648                 returns the request thread.
2649        """
2650        kwargs['_return_http_data_only'] = True
2651        if kwargs.get('callback'):
2652            return self.get_with_http_info(account_id, template_id, **kwargs)
2653        else:
2654            (data) = self.get_with_http_info(account_id, template_id, **kwargs)
2655            return data
2656
2657    def get_with_http_info(self, account_id, template_id, **kwargs):
2658        """
2659        Gets a list of templates for a specified account.
2660        Retrieves the definition of the specified template.
2661        This method makes a synchronous HTTP request by default. To make an
2662        asynchronous HTTP request, please define a `callback` function
2663        to be invoked when receiving the response.
2664        >>> def callback_function(response):
2665        >>>     pprint(response)
2666        >>>
2667        >>> thread = api.get_with_http_info(account_id, template_id, callback=callback_function)
2668
2669        :param callback function: The callback function
2670            for asynchronous request. (optional)
2671        :param str account_id: The external account number (int) or account ID Guid. (required)
2672        :param str template_id: The ID of the template being accessed. (required)
2673        :param str include:
2674        :return: EnvelopeTemplate
2675                 If the method is called asynchronously,
2676                 returns the request thread.
2677        """
2678
2679        all_params = ['account_id', 'template_id', 'include']
2680        all_params.append('callback')
2681        all_params.append('_return_http_data_only')
2682        all_params.append('_preload_content')
2683        all_params.append('_request_timeout')
2684
2685        params = locals()
2686        for key, val in iteritems(params['kwargs']):
2687            if key not in all_params:
2688                raise TypeError(
2689                    "Got an unexpected keyword argument '%s'"
2690                    " to method get" % key
2691                )
2692            params[key] = val
2693        del params['kwargs']
2694        # verify the required parameter 'account_id' is set
2695        if ('account_id' not in params) or (params['account_id'] is None):
2696            raise ValueError("Missing the required parameter `account_id` when calling `get`")
2697        # verify the required parameter 'template_id' is set
2698        if ('template_id' not in params) or (params['template_id'] is None):
2699            raise ValueError("Missing the required parameter `template_id` when calling `get`")
2700
2701
2702        collection_formats = {}
2703
2704        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json')
2705        path_params = {}
2706        if 'account_id' in params:
2707            path_params['accountId'] = params['account_id']
2708        if 'template_id' in params:
2709            path_params['templateId'] = params['template_id']
2710
2711        query_params = {}
2712        if 'include' in params:
2713            query_params['include'] = params['include']
2714
2715        header_params = {}
2716
2717        form_params = []
2718        local_var_files = {}
2719
2720        body_params = None
2721        # HTTP header `Accept`
2722        header_params['Accept'] = self.api_client.\
2723            select_header_accept(['application/json'])
2724
2725        # Authentication setting
2726        auth_settings = []
2727
2728        return self.api_client.call_api(resource_path, 'GET',
2729                                        path_params,
2730                                        query_params,
2731                                        header_params,
2732                                        body=body_params,
2733                                        post_params=form_params,
2734                                        files=local_var_files,
2735                                        response_type='EnvelopeTemplate',
2736                                        auth_settings=auth_settings,
2737                                        callback=params.get('callback'),
2738                                        _return_http_data_only=params.get('_return_http_data_only'),
2739                                        _preload_content=params.get('_preload_content', True),
2740                                        _request_timeout=params.get('_request_timeout'),
2741                                        collection_formats=collection_formats)
2742
2743    def get_document(self, account_id, document_id, template_id, **kwargs):
2744        """
2745        Gets PDF documents from a template.
2746        Retrieves one or more PDF documents from the specified template.  You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf.
2747        This method makes a synchronous HTTP request by default. To make an
2748        asynchronous HTTP request, please define a `callback` function
2749        to be invoked when receiving the response.
2750        >>> def callback_function(response):
2751        >>>     pprint(response)
2752        >>>
2753        >>> thread = api.get_document(account_id, document_id, template_id, callback=callback_function)
2754
2755        :param callback function: The callback function
2756            for asynchronous request. (optional)
2757        :param str account_id: The external account number (int) or account ID Guid. (required)
2758        :param str document_id: The ID of the document being accessed. (required)
2759        :param str template_id: The ID of the template being accessed. (required)
2760        :param str encrypt:
2761        :param str show_changes:
2762        :return: file
2763                 If the method is called asynchronously,
2764                 returns the request thread.
2765        """
2766        kwargs['_return_http_data_only'] = True
2767        if kwargs.get('callback'):
2768            return self.get_document_with_http_info(account_id, document_id, template_id, **kwargs)
2769        else:
2770            (data) = self.get_document_with_http_info(account_id, document_id, template_id, **kwargs)
2771            return data
2772
2773    def get_document_with_http_info(self, account_id, document_id, template_id, **kwargs):
2774        """
2775        Gets PDF documents from a template.
2776        Retrieves one or more PDF documents from the specified template.  You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf.
2777        This method makes a synchronous HTTP request by default. To make an
2778        asynchronous HTTP request, please define a `callback` function
2779        to be invoked when receiving the response.
2780        >>> def callback_function(response):
2781        >>>     pprint(response)
2782        >>>
2783        >>> thread = api.get_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
2784
2785        :param callback function: The callback function
2786            for asynchronous request. (optional)
2787        :param str account_id: The external account number (int) or account ID Guid. (required)
2788        :param str document_id: The ID of the document being accessed. (required)
2789        :param str template_id: The ID of the template being accessed. (required)
2790        :param str encrypt:
2791        :param str show_changes:
2792        :return: file
2793                 If the method is called asynchronously,
2794                 returns the request thread.
2795        """
2796
2797        all_params = ['account_id', 'document_id', 'template_id', 'encrypt', 'show_changes']
2798        all_params.append('callback')
2799        all_params.append('_return_http_data_only')
2800        all_params.append('_preload_content')
2801        all_params.append('_request_timeout')
2802
2803        params = locals()
2804        for key, val in iteritems(params['kwargs']):
2805            if key not in all_params:
2806                raise TypeError(
2807                    "Got an unexpected keyword argument '%s'"
2808                    " to method get_document" % key
2809                )
2810            params[key] = val
2811        del params['kwargs']
2812        # verify the required parameter 'account_id' is set
2813        if ('account_id' not in params) or (params['account_id'] is None):
2814            raise ValueError("Missing the required parameter `account_id` when calling `get_document`")
2815        # verify the required parameter 'document_id' is set
2816        if ('document_id' not in params) or (params['document_id'] is None):
2817            raise ValueError("Missing the required parameter `document_id` when calling `get_document`")
2818        # verify the required parameter 'template_id' is set
2819        if ('template_id' not in params) or (params['template_id'] is None):
2820            raise ValueError("Missing the required parameter `template_id` when calling `get_document`")
2821
2822
2823        collection_formats = {}
2824
2825        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
2826        path_params = {}
2827        if 'account_id' in params:
2828            path_params['accountId'] = params['account_id']
2829        if 'document_id' in params:
2830            path_params['documentId'] = params['document_id']
2831        if 'template_id' in params:
2832            path_params['templateId'] = params['template_id']
2833
2834        query_params = {}
2835        if 'encrypt' in params:
2836            query_params['encrypt'] = params['encrypt']
2837        if 'show_changes' in params:
2838            query_params['show_changes'] = params['show_changes']
2839
2840        header_params = {}
2841
2842        form_params = []
2843        local_var_files = {}
2844
2845        body_params = None
2846        # HTTP header `Accept`
2847        header_params['Accept'] = self.api_client.\
2848            select_header_accept(['application/pdf'])
2849
2850        # Authentication setting
2851        auth_settings = []
2852
2853        return self.api_client.call_api(resource_path, 'GET',
2854                                        path_params,
2855                                        query_params,
2856                                        header_params,
2857                                        body=body_params,
2858                                        post_params=form_params,
2859                                        files=local_var_files,
2860                                        response_type='file',
2861                                        auth_settings=auth_settings,
2862                                        callback=params.get('callback'),
2863                                        _return_http_data_only=params.get('_return_http_data_only'),
2864                                        _preload_content=params.get('_preload_content', True),
2865                                        _request_timeout=params.get('_request_timeout'),
2866                                        collection_formats=collection_formats)
2867
2868    def get_document_page_image(self, account_id, document_id, page_number, template_id, **kwargs):
2869        """
2870        Gets a page image from a template for display.
2871        Retrieves a page image for display from the specified template.
2872        This method makes a synchronous HTTP request by default. To make an
2873        asynchronous HTTP request, please define a `callback` function
2874        to be invoked when receiving the response.
2875        >>> def callback_function(response):
2876        >>>     pprint(response)
2877        >>>
2878        >>> thread = api.get_document_page_image(account_id, document_id, page_number, template_id, callback=callback_function)
2879
2880        :param callback function: The callback function
2881            for asynchronous request. (optional)
2882        :param str account_id: The external account number (int) or account ID Guid. (required)
2883        :param str document_id: The ID of the document being accessed. (required)
2884        :param str page_number: The page number being accessed. (required)
2885        :param str template_id: The ID of the template being accessed. (required)
2886        :param str dpi:
2887        :param str max_height:
2888        :param str max_width:
2889        :param str show_changes:
2890        :return: file
2891                 If the method is called asynchronously,
2892                 returns the request thread.
2893        """
2894        kwargs['_return_http_data_only'] = True
2895        if kwargs.get('callback'):
2896            return self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2897        else:
2898            (data) = self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2899            return data
2900
2901    def get_document_page_image_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
2902        """
2903        Gets a page image from a template for display.
2904        Retrieves a page image for display from the specified template.
2905        This method makes a synchronous HTTP request by default. To make an
2906        asynchronous HTTP request, please define a `callback` function
2907        to be invoked when receiving the response.
2908        >>> def callback_function(response):
2909        >>>     pprint(response)
2910        >>>
2911        >>> thread = api.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
2912
2913        :param callback function: The callback function
2914            for asynchronous request. (optional)
2915        :param str account_id: The external account number (int) or account ID Guid. (required)
2916        :param str document_id: The ID of the document being accessed. (required)
2917        :param str page_number: The page number being accessed. (required)
2918        :param str template_id: The ID of the template being accessed. (required)
2919        :param str dpi:
2920        :param str max_height:
2921        :param str max_width:
2922        :param str show_changes:
2923        :return: file
2924                 If the method is called asynchronously,
2925                 returns the request thread.
2926        """
2927
2928        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'dpi', 'max_height', 'max_width', 'show_changes']
2929        all_params.append('callback')
2930        all_params.append('_return_http_data_only')
2931        all_params.append('_preload_content')
2932        all_params.append('_request_timeout')
2933
2934        params = locals()
2935        for key, val in iteritems(params['kwargs']):
2936            if key not in all_params:
2937                raise TypeError(
2938                    "Got an unexpected keyword argument '%s'"
2939                    " to method get_document_page_image" % key
2940                )
2941            params[key] = val
2942        del params['kwargs']
2943        # verify the required parameter 'account_id' is set
2944        if ('account_id' not in params) or (params['account_id'] is None):
2945            raise ValueError("Missing the required parameter `account_id` when calling `get_document_page_image`")
2946        # verify the required parameter 'document_id' is set
2947        if ('document_id' not in params) or (params['document_id'] is None):
2948            raise ValueError("Missing the required parameter `document_id` when calling `get_document_page_image`")
2949        # verify the required parameter 'page_number' is set
2950        if ('page_number' not in params) or (params['page_number'] is None):
2951            raise ValueError("Missing the required parameter `page_number` when calling `get_document_page_image`")
2952        # verify the required parameter 'template_id' is set
2953        if ('template_id' not in params) or (params['template_id'] is None):
2954            raise ValueError("Missing the required parameter `template_id` when calling `get_document_page_image`")
2955
2956
2957        collection_formats = {}
2958
2959        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
2960        path_params = {}
2961        if 'account_id' in params:
2962            path_params['accountId'] = params['account_id']
2963        if 'document_id' in params:
2964            path_params['documentId'] = params['document_id']
2965        if 'page_number' in params:
2966            path_params['pageNumber'] = params['page_number']
2967        if 'template_id' in params:
2968            path_params['templateId'] = params['template_id']
2969
2970        query_params = {}
2971        if 'dpi' in params:
2972            query_params['dpi'] = params['dpi']
2973        if 'max_height' in params:
2974            query_params['max_height'] = params['max_height']
2975        if 'max_width' in params:
2976            query_params['max_width'] = params['max_width']
2977        if 'show_changes' in params:
2978            query_params['show_changes'] = params['show_changes']
2979
2980        header_params = {}
2981
2982        form_params = []
2983        local_var_files = {}
2984
2985        body_params = None
2986        # HTTP header `Accept`
2987        header_params['Accept'] = self.api_client.\
2988            select_header_accept(['image/png'])
2989
2990        # Authentication setting
2991        auth_settings = []
2992
2993        return self.api_client.call_api(resource_path, 'GET',
2994                                        path_params,
2995                                        query_params,
2996                                        header_params,
2997                                        body=body_params,
2998                                        post_params=form_params,
2999                                        files=local_var_files,
3000                                        response_type='file',
3001                                        auth_settings=auth_settings,
3002                                        callback=params.get('callback'),
3003                                        _return_http_data_only=params.get('_return_http_data_only'),
3004                                        _preload_content=params.get('_preload_content', True),
3005                                        _request_timeout=params.get('_request_timeout'),
3006                                        collection_formats=collection_formats)
3007
3008    def get_document_tabs(self, account_id, document_id, template_id, **kwargs):
3009        """
3010        Returns tabs on the document.
3011        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
3012        This method makes a synchronous HTTP request by default. To make an
3013        asynchronous HTTP request, please define a `callback` function
3014        to be invoked when receiving the response.
3015        >>> def callback_function(response):
3016        >>>     pprint(response)
3017        >>>
3018        >>> thread = api.get_document_tabs(account_id, document_id, template_id, callback=callback_function)
3019
3020        :param callback function: The callback function
3021            for asynchronous request. (optional)
3022        :param str account_id: The external account number (int) or account ID Guid. (required)
3023        :param str document_id: The ID of the document being accessed. (required)
3024        :param str template_id: The ID of the template being accessed. (required)
3025        :param str page_numbers:
3026        :return: Tabs
3027                 If the method is called asynchronously,
3028                 returns the request thread.
3029        """
3030        kwargs['_return_http_data_only'] = True
3031        if kwargs.get('callback'):
3032            return self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
3033        else:
3034            (data) = self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
3035            return data
3036
3037    def get_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
3038        """
3039        Returns tabs on the document.
3040        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
3041        This method makes a synchronous HTTP request by default. To make an
3042        asynchronous HTTP request, please define a `callback` function
3043        to be invoked when receiving the response.
3044        >>> def callback_function(response):
3045        >>>     pprint(response)
3046        >>>
3047        >>> thread = api.get_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
3048
3049        :param callback function: The callback function
3050            for asynchronous request. (optional)
3051        :param str account_id: The external account number (int) or account ID Guid. (required)
3052        :param str document_id: The ID of the document being accessed. (required)
3053        :param str template_id: The ID of the template being accessed. (required)
3054        :param str page_numbers:
3055        :return: Tabs
3056                 If the method is called asynchronously,
3057                 returns the request thread.
3058        """
3059
3060        all_params = ['account_id', 'document_id', 'template_id', 'page_numbers']
3061        all_params.append('callback')
3062        all_params.append('_return_http_data_only')
3063        all_params.append('_preload_content')
3064        all_params.append('_request_timeout')
3065
3066        params = locals()
3067        for key, val in iteritems(params['kwargs']):
3068            if key not in all_params:
3069                raise TypeError(
3070                    "Got an unexpected keyword argument '%s'"
3071                    " to method get_document_tabs" % key
3072                )
3073            params[key] = val
3074        del params['kwargs']
3075        # verify the required parameter 'account_id' is set
3076        if ('account_id' not in params) or (params['account_id'] is None):
3077            raise ValueError("Missing the required parameter `account_id` when calling `get_document_tabs`")
3078        # verify the required parameter 'document_id' is set
3079        if ('document_id' not in params) or (params['document_id'] is None):
3080            raise ValueError("Missing the required parameter `document_id` when calling `get_document_tabs`")
3081        # verify the required parameter 'template_id' is set
3082        if ('template_id' not in params) or (params['template_id'] is None):
3083            raise ValueError("Missing the required parameter `template_id` when calling `get_document_tabs`")
3084
3085
3086        collection_formats = {}
3087
3088        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
3089        path_params = {}
3090        if 'account_id' in params:
3091            path_params['accountId'] = params['account_id']
3092        if 'document_id' in params:
3093            path_params['documentId'] = params['document_id']
3094        if 'template_id' in params:
3095            path_params['templateId'] = params['template_id']
3096
3097        query_params = {}
3098        if 'page_numbers' in params:
3099            query_params['page_numbers'] = params['page_numbers']
3100
3101        header_params = {}
3102
3103        form_params = []
3104        local_var_files = {}
3105
3106        body_params = None
3107        # HTTP header `Accept`
3108        header_params['Accept'] = self.api_client.\
3109            select_header_accept(['application/json'])
3110
3111        # Authentication setting
3112        auth_settings = []
3113
3114        return self.api_client.call_api(resource_path, 'GET',
3115                                        path_params,
3116                                        query_params,
3117                                        header_params,
3118                                        body=body_params,
3119                                        post_params=form_params,
3120                                        files=local_var_files,
3121                                        response_type='Tabs',
3122                                        auth_settings=auth_settings,
3123                                        callback=params.get('callback'),
3124                                        _return_http_data_only=params.get('_return_http_data_only'),
3125                                        _preload_content=params.get('_preload_content', True),
3126                                        _request_timeout=params.get('_request_timeout'),
3127                                        collection_formats=collection_formats)
3128
3129    def get_lock(self, account_id, template_id, **kwargs):
3130        """
3131        Gets template lock information.
3132        Retrieves general information about the template lock.  If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header  field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header.
3133        This method makes a synchronous HTTP request by default. To make an
3134        asynchronous HTTP request, please define a `callback` function
3135        to be invoked when receiving the response.
3136        >>> def callback_function(response):
3137        >>>     pprint(response)
3138        >>>
3139        >>> thread = api.get_lock(account_id, template_id, callback=callback_function)
3140
3141        :param callback function: The callback function
3142            for asynchronous request. (optional)
3143        :param str account_id: The external account number (int) or account ID Guid. (required)
3144        :param str template_id: The ID of the template being accessed. (required)
3145        :return: LockInformation
3146                 If the method is called asynchronously,
3147                 returns the request thread.
3148        """
3149        kwargs['_return_http_data_only'] = True
3150        if kwargs.get('callback'):
3151            return self.get_lock_with_http_info(account_id, template_id, **kwargs)
3152        else:
3153            (data) = self.get_lock_with_http_info(account_id, template_id, **kwargs)
3154            return data
3155
3156    def get_lock_with_http_info(self, account_id, template_id, **kwargs):
3157        """
3158        Gets template lock information.
3159        Retrieves general information about the template lock.  If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header  field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header.
3160        This method makes a synchronous HTTP request by default. To make an
3161        asynchronous HTTP request, please define a `callback` function
3162        to be invoked when receiving the response.
3163        >>> def callback_function(response):
3164        >>>     pprint(response)
3165        >>>
3166        >>> thread = api.get_lock_with_http_info(account_id, template_id, callback=callback_function)
3167
3168        :param callback function: The callback function
3169            for asynchronous request. (optional)
3170        :param str account_id: The external account number (int) or account ID Guid. (required)
3171        :param str template_id: The ID of the template being accessed. (required)
3172        :return: LockInformation
3173                 If the method is called asynchronously,
3174                 returns the request thread.
3175        """
3176
3177        all_params = ['account_id', 'template_id']
3178        all_params.append('callback')
3179        all_params.append('_return_http_data_only')
3180        all_params.append('_preload_content')
3181        all_params.append('_request_timeout')
3182
3183        params = locals()
3184        for key, val in iteritems(params['kwargs']):
3185            if key not in all_params:
3186                raise TypeError(
3187                    "Got an unexpected keyword argument '%s'"
3188                    " to method get_lock" % key
3189                )
3190            params[key] = val
3191        del params['kwargs']
3192        # verify the required parameter 'account_id' is set
3193        if ('account_id' not in params) or (params['account_id'] is None):
3194            raise ValueError("Missing the required parameter `account_id` when calling `get_lock`")
3195        # verify the required parameter 'template_id' is set
3196        if ('template_id' not in params) or (params['template_id'] is None):
3197            raise ValueError("Missing the required parameter `template_id` when calling `get_lock`")
3198
3199
3200        collection_formats = {}
3201
3202        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
3203        path_params = {}
3204        if 'account_id' in params:
3205            path_params['accountId'] = params['account_id']
3206        if 'template_id' in params:
3207            path_params['templateId'] = params['template_id']
3208
3209        query_params = {}
3210
3211        header_params = {}
3212
3213        form_params = []
3214        local_var_files = {}
3215
3216        body_params = None
3217        # HTTP header `Accept`
3218        header_params['Accept'] = self.api_client.\
3219            select_header_accept(['application/json'])
3220
3221        # Authentication setting
3222        auth_settings = []
3223
3224        return self.api_client.call_api(resource_path, 'GET',
3225                                        path_params,
3226                                        query_params,
3227                                        header_params,
3228                                        body=body_params,
3229                                        post_params=form_params,
3230                                        files=local_var_files,
3231                                        response_type='LockInformation',
3232                                        auth_settings=auth_settings,
3233                                        callback=params.get('callback'),
3234                                        _return_http_data_only=params.get('_return_http_data_only'),
3235                                        _preload_content=params.get('_preload_content', True),
3236                                        _request_timeout=params.get('_request_timeout'),
3237                                        collection_formats=collection_formats)
3238
3239    def get_notification_settings(self, account_id, template_id, **kwargs):
3240        """
3241        Gets template notification information.
3242        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3243        This method makes a synchronous HTTP request by default. To make an
3244        asynchronous HTTP request, please define a `callback` function
3245        to be invoked when receiving the response.
3246        >>> def callback_function(response):
3247        >>>     pprint(response)
3248        >>>
3249        >>> thread = api.get_notification_settings(account_id, template_id, callback=callback_function)
3250
3251        :param callback function: The callback function
3252            for asynchronous request. (optional)
3253        :param str account_id: The external account number (int) or account ID Guid. (required)
3254        :param str template_id: The ID of the template being accessed. (required)
3255        :return: Notification
3256                 If the method is called asynchronously,
3257                 returns the request thread.
3258        """
3259        kwargs['_return_http_data_only'] = True
3260        if kwargs.get('callback'):
3261            return self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3262        else:
3263            (data) = self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3264            return data
3265
3266    def get_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
3267        """
3268        Gets template notification information.
3269        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3270        This method makes a synchronous HTTP request by default. To make an
3271        asynchronous HTTP request, please define a `callback` function
3272        to be invoked when receiving the response.
3273        >>> def callback_function(response):
3274        >>>     pprint(response)
3275        >>>
3276        >>> thread = api.get_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
3277
3278        :param callback function: The callback function
3279            for asynchronous request. (optional)
3280        :param str account_id: The external account number (int) or account ID Guid. (required)
3281        :param str template_id: The ID of the template being accessed. (required)
3282        :return: Notification
3283                 If the method is called asynchronously,
3284                 returns the request thread.
3285        """
3286
3287        all_params = ['account_id', 'template_id']
3288        all_params.append('callback')
3289        all_params.append('_return_http_data_only')
3290        all_params.append('_preload_content')
3291        all_params.append('_request_timeout')
3292
3293        params = locals()
3294        for key, val in iteritems(params['kwargs']):
3295            if key not in all_params:
3296                raise TypeError(
3297                    "Got an unexpected keyword argument '%s'"
3298                    " to method get_notification_settings" % key
3299                )
3300            params[key] = val
3301        del params['kwargs']
3302        # verify the required parameter 'account_id' is set
3303        if ('account_id' not in params) or (params['account_id'] is None):
3304            raise ValueError("Missing the required parameter `account_id` when calling `get_notification_settings`")
3305        # verify the required parameter 'template_id' is set
3306        if ('template_id' not in params) or (params['template_id'] is None):
3307            raise ValueError("Missing the required parameter `template_id` when calling `get_notification_settings`")
3308
3309
3310        collection_formats = {}
3311
3312        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
3313        path_params = {}
3314        if 'account_id' in params:
3315            path_params['accountId'] = params['account_id']
3316        if 'template_id' in params:
3317            path_params['templateId'] = params['template_id']
3318
3319        query_params = {}
3320
3321        header_params = {}
3322
3323        form_params = []
3324        local_var_files = {}
3325
3326        body_params = None
3327        # HTTP header `Accept`
3328        header_params['Accept'] = self.api_client.\
3329            select_header_accept(['application/json'])
3330
3331        # Authentication setting
3332        auth_settings = []
3333
3334        return self.api_client.call_api(resource_path, 'GET',
3335                                        path_params,
3336                                        query_params,
3337                                        header_params,
3338                                        body=body_params,
3339                                        post_params=form_params,
3340                                        files=local_var_files,
3341                                        response_type='Notification',
3342                                        auth_settings=auth_settings,
3343                                        callback=params.get('callback'),
3344                                        _return_http_data_only=params.get('_return_http_data_only'),
3345                                        _preload_content=params.get('_preload_content', True),
3346                                        _request_timeout=params.get('_request_timeout'),
3347                                        collection_formats=collection_formats)
3348
3349    def get_page_tabs(self, account_id, document_id, page_number, template_id, **kwargs):
3350        """
3351        Returns tabs on the specified page.
3352        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3353        This method makes a synchronous HTTP request by default. To make an
3354        asynchronous HTTP request, please define a `callback` function
3355        to be invoked when receiving the response.
3356        >>> def callback_function(response):
3357        >>>     pprint(response)
3358        >>>
3359        >>> thread = api.get_page_tabs(account_id, document_id, page_number, template_id, callback=callback_function)
3360
3361        :param callback function: The callback function
3362            for asynchronous request. (optional)
3363        :param str account_id: The external account number (int) or account ID Guid. (required)
3364        :param str document_id: The ID of the document being accessed. (required)
3365        :param str page_number: The page number being accessed. (required)
3366        :param str template_id: The ID of the template being accessed. (required)
3367        :return: Tabs
3368                 If the method is called asynchronously,
3369                 returns the request thread.
3370        """
3371        kwargs['_return_http_data_only'] = True
3372        if kwargs.get('callback'):
3373            return self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3374        else:
3375            (data) = self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3376            return data
3377
3378    def get_page_tabs_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
3379        """
3380        Returns tabs on the specified page.
3381        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3382        This method makes a synchronous HTTP request by default. To make an
3383        asynchronous HTTP request, please define a `callback` function
3384        to be invoked when receiving the response.
3385        >>> def callback_function(response):
3386        >>>     pprint(response)
3387        >>>
3388        >>> thread = api.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
3389
3390        :param callback function: The callback function
3391            for asynchronous request. (optional)
3392        :param str account_id: The external account number (int) or account ID Guid. (required)
3393        :param str document_id: The ID of the document being accessed. (required)
3394        :param str page_number: The page number being accessed. (required)
3395        :param str template_id: The ID of the template being accessed. (required)
3396        :return: Tabs
3397                 If the method is called asynchronously,
3398                 returns the request thread.
3399        """
3400
3401        all_params = ['account_id', 'document_id', 'page_number', 'template_id']
3402        all_params.append('callback')
3403        all_params.append('_return_http_data_only')
3404        all_params.append('_preload_content')
3405        all_params.append('_request_timeout')
3406
3407        params = locals()
3408        for key, val in iteritems(params['kwargs']):
3409            if key not in all_params:
3410                raise TypeError(
3411                    "Got an unexpected keyword argument '%s'"
3412                    " to method get_page_tabs" % key
3413                )
3414            params[key] = val
3415        del params['kwargs']
3416        # verify the required parameter 'account_id' is set
3417        if ('account_id' not in params) or (params['account_id'] is None):
3418            raise ValueError("Missing the required parameter `account_id` when calling `get_page_tabs`")
3419        # verify the required parameter 'document_id' is set
3420        if ('document_id' not in params) or (params['document_id'] is None):
3421            raise ValueError("Missing the required parameter `document_id` when calling `get_page_tabs`")
3422        # verify the required parameter 'page_number' is set
3423        if ('page_number' not in params) or (params['page_number'] is None):
3424            raise ValueError("Missing the required parameter `page_number` when calling `get_page_tabs`")
3425        # verify the required parameter 'template_id' is set
3426        if ('template_id' not in params) or (params['template_id'] is None):
3427            raise ValueError("Missing the required parameter `template_id` when calling `get_page_tabs`")
3428
3429
3430        collection_formats = {}
3431
3432        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/tabs'.replace('{format}', 'json')
3433        path_params = {}
3434        if 'account_id' in params:
3435            path_params['accountId'] = params['account_id']
3436        if 'document_id' in params:
3437            path_params['documentId'] = params['document_id']
3438        if 'page_number' in params:
3439            path_params['pageNumber'] = params['page_number']
3440        if 'template_id' in params:
3441            path_params['templateId'] = params['template_id']
3442
3443        query_params = {}
3444
3445        header_params = {}
3446
3447        form_params = []
3448        local_var_files = {}
3449
3450        body_params = None
3451        # HTTP header `Accept`
3452        header_params['Accept'] = self.api_client.\
3453            select_header_accept(['application/json'])
3454
3455        # Authentication setting
3456        auth_settings = []
3457
3458        return self.api_client.call_api(resource_path, 'GET',
3459                                        path_params,
3460                                        query_params,
3461                                        header_params,
3462                                        body=body_params,
3463                                        post_params=form_params,
3464                                        files=local_var_files,
3465                                        response_type='Tabs',
3466                                        auth_settings=auth_settings,
3467                                        callback=params.get('callback'),
3468                                        _return_http_data_only=params.get('_return_http_data_only'),
3469                                        _preload_content=params.get('_preload_content', True),
3470                                        _request_timeout=params.get('_request_timeout'),
3471                                        collection_formats=collection_formats)
3472
3473    def get_pages(self, account_id, document_id, template_id, **kwargs):
3474        """
3475        Returns document page image(s) based on input.
3476        Returns images of the pages in a template document for display based on the parameters that you specify.
3477        This method makes a synchronous HTTP request by default. To make an
3478        asynchronous HTTP request, please define a `callback` function
3479        to be invoked when receiving the response.
3480        >>> def callback_function(response):
3481        >>>     pprint(response)
3482        >>>
3483        >>> thread = api.get_pages(account_id, document_id, template_id, callback=callback_function)
3484
3485        :param callback function: The callback function
3486            for asynchronous request. (optional)
3487        :param str account_id: The external account number (int) or account ID Guid. (required)
3488        :param str document_id: The ID of the document being accessed. (required)
3489        :param str template_id: The ID of the template being accessed. (required)
3490        :param str count:
3491        :param str dpi:
3492        :param str max_height:
3493        :param str max_width:
3494        :param str nocache:
3495        :param str show_changes:
3496        :param str start_position:
3497        :return: PageImages
3498                 If the method is called asynchronously,
3499                 returns the request thread.
3500        """
3501        kwargs['_return_http_data_only'] = True
3502        if kwargs.get('callback'):
3503            return self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3504        else:
3505            (data) = self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3506            return data
3507
3508    def get_pages_with_http_info(self, account_id, document_id, template_id, **kwargs):
3509        """
3510        Returns document page image(s) based on input.
3511        Returns images of the pages in a template document for display based on the parameters that you specify.
3512        This method makes a synchronous HTTP request by default. To make an
3513        asynchronous HTTP request, please define a `callback` function
3514        to be invoked when receiving the response.
3515        >>> def callback_function(response):
3516        >>>     pprint(response)
3517        >>>
3518        >>> thread = api.get_pages_with_http_info(account_id, document_id, template_id, callback=callback_function)
3519
3520        :param callback function: The callback function
3521            for asynchronous request. (optional)
3522        :param str account_id: The external account number (int) or account ID Guid. (required)
3523        :param str document_id: The ID of the document being accessed. (required)
3524        :param str template_id: The ID of the template being accessed. (required)
3525        :param str count:
3526        :param str dpi:
3527        :param str max_height:
3528        :param str max_width:
3529        :param str nocache:
3530        :param str show_changes:
3531        :param str start_position:
3532        :return: PageImages
3533                 If the method is called asynchronously,
3534                 returns the request thread.
3535        """
3536
3537        all_params = ['account_id', 'document_id', 'template_id', 'count', 'dpi', 'max_height', 'max_width', 'nocache', 'show_changes', 'start_position']
3538        all_params.append('callback')
3539        all_params.append('_return_http_data_only')
3540        all_params.append('_preload_content')
3541        all_params.append('_request_timeout')
3542
3543        params = locals()
3544        for key, val in iteritems(params['kwargs']):
3545            if key not in all_params:
3546                raise TypeError(
3547                    "Got an unexpected keyword argument '%s'"
3548                    " to method get_pages" % key
3549                )
3550            params[key] = val
3551        del params['kwargs']
3552        # verify the required parameter 'account_id' is set
3553        if ('account_id' not in params) or (params['account_id'] is None):
3554            raise ValueError("Missing the required parameter `account_id` when calling `get_pages`")
3555        # verify the required parameter 'document_id' is set
3556        if ('document_id' not in params) or (params['document_id'] is None):
3557            raise ValueError("Missing the required parameter `document_id` when calling `get_pages`")
3558        # verify the required parameter 'template_id' is set
3559        if ('template_id' not in params) or (params['template_id'] is None):
3560            raise ValueError("Missing the required parameter `template_id` when calling `get_pages`")
3561
3562
3563        collection_formats = {}
3564
3565        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages'.replace('{format}', 'json')
3566        path_params = {}
3567        if 'account_id' in params:
3568            path_params['accountId'] = params['account_id']
3569        if 'document_id' in params:
3570            path_params['documentId'] = params['document_id']
3571        if 'template_id' in params:
3572            path_params['templateId'] = params['template_id']
3573
3574        query_params = {}
3575        if 'count' in params:
3576            query_params['count'] = params['count']
3577        if 'dpi' in params:
3578            query_params['dpi'] = params['dpi']
3579        if 'max_height' in params:
3580            query_params['max_height'] = params['max_height']
3581        if 'max_width' in params:
3582            query_params['max_width'] = params['max_width']
3583        if 'nocache' in params:
3584            query_params['nocache'] = params['nocache']
3585        if 'show_changes' in params:
3586            query_params['show_changes'] = params['show_changes']
3587        if 'start_position' in params:
3588            query_params['start_position'] = params['start_position']
3589
3590        header_params = {}
3591
3592        form_params = []
3593        local_var_files = {}
3594
3595        body_params = None
3596        # HTTP header `Accept`
3597        header_params['Accept'] = self.api_client.\
3598            select_header_accept(['application/json'])
3599
3600        # Authentication setting
3601        auth_settings = []
3602
3603        return self.api_client.call_api(resource_path, 'GET',
3604                                        path_params,
3605                                        query_params,
3606                                        header_params,
3607                                        body=body_params,
3608                                        post_params=form_params,
3609                                        files=local_var_files,
3610                                        response_type='PageImages',
3611                                        auth_settings=auth_settings,
3612                                        callback=params.get('callback'),
3613                                        _return_http_data_only=params.get('_return_http_data_only'),
3614                                        _preload_content=params.get('_preload_content', True),
3615                                        _request_timeout=params.get('_request_timeout'),
3616                                        collection_formats=collection_formats)
3617
3618    def get_template_document_html_definitions(self, account_id, document_id, template_id, **kwargs):
3619        """
3620        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3621        
3622        This method makes a synchronous HTTP request by default. To make an
3623        asynchronous HTTP request, please define a `callback` function
3624        to be invoked when receiving the response.
3625        >>> def callback_function(response):
3626        >>>     pprint(response)
3627        >>>
3628        >>> thread = api.get_template_document_html_definitions(account_id, document_id, template_id, callback=callback_function)
3629
3630        :param callback function: The callback function
3631            for asynchronous request. (optional)
3632        :param str account_id: The external account number (int) or account ID Guid. (required)
3633        :param str document_id: The ID of the document being accessed. (required)
3634        :param str template_id: The ID of the template being accessed. (required)
3635        :return: DocumentHtmlDefinitionOriginals
3636                 If the method is called asynchronously,
3637                 returns the request thread.
3638        """
3639        kwargs['_return_http_data_only'] = True
3640        if kwargs.get('callback'):
3641            return self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3642        else:
3643            (data) = self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3644            return data
3645
3646    def get_template_document_html_definitions_with_http_info(self, account_id, document_id, template_id, **kwargs):
3647        """
3648        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3649        
3650        This method makes a synchronous HTTP request by default. To make an
3651        asynchronous HTTP request, please define a `callback` function
3652        to be invoked when receiving the response.
3653        >>> def callback_function(response):
3654        >>>     pprint(response)
3655        >>>
3656        >>> thread = api.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, callback=callback_function)
3657
3658        :param callback function: The callback function
3659            for asynchronous request. (optional)
3660        :param str account_id: The external account number (int) or account ID Guid. (required)
3661        :param str document_id: The ID of the document being accessed. (required)
3662        :param str template_id: The ID of the template being accessed. (required)
3663        :return: DocumentHtmlDefinitionOriginals
3664                 If the method is called asynchronously,
3665                 returns the request thread.
3666        """
3667
3668        all_params = ['account_id', 'document_id', 'template_id']
3669        all_params.append('callback')
3670        all_params.append('_return_http_data_only')
3671        all_params.append('_preload_content')
3672        all_params.append('_request_timeout')
3673
3674        params = locals()
3675        for key, val in iteritems(params['kwargs']):
3676            if key not in all_params:
3677                raise TypeError(
3678                    "Got an unexpected keyword argument '%s'"
3679                    " to method get_template_document_html_definitions" % key
3680                )
3681            params[key] = val
3682        del params['kwargs']
3683        # verify the required parameter 'account_id' is set
3684        if ('account_id' not in params) or (params['account_id'] is None):
3685            raise ValueError("Missing the required parameter `account_id` when calling `get_template_document_html_definitions`")
3686        # verify the required parameter 'document_id' is set
3687        if ('document_id' not in params) or (params['document_id'] is None):
3688            raise ValueError("Missing the required parameter `document_id` when calling `get_template_document_html_definitions`")
3689        # verify the required parameter 'template_id' is set
3690        if ('template_id' not in params) or (params['template_id'] is None):
3691            raise ValueError("Missing the required parameter `template_id` when calling `get_template_document_html_definitions`")
3692
3693
3694        collection_formats = {}
3695
3696        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/html_definitions'.replace('{format}', 'json')
3697        path_params = {}
3698        if 'account_id' in params:
3699            path_params['accountId'] = params['account_id']
3700        if 'document_id' in params:
3701            path_params['documentId'] = params['document_id']
3702        if 'template_id' in params:
3703            path_params['templateId'] = params['template_id']
3704
3705        query_params = {}
3706
3707        header_params = {}
3708
3709        form_params = []
3710        local_var_files = {}
3711
3712        body_params = None
3713        # HTTP header `Accept`
3714        header_params['Accept'] = self.api_client.\
3715            select_header_accept(['application/json'])
3716
3717        # Authentication setting
3718        auth_settings = []
3719
3720        return self.api_client.call_api(resource_path, 'GET',
3721                                        path_params,
3722                                        query_params,
3723                                        header_params,
3724                                        body=body_params,
3725                                        post_params=form_params,
3726                                        files=local_var_files,
3727                                        response_type='DocumentHtmlDefinitionOriginals',
3728                                        auth_settings=auth_settings,
3729                                        callback=params.get('callback'),
3730                                        _return_http_data_only=params.get('_return_http_data_only'),
3731                                        _preload_content=params.get('_preload_content', True),
3732                                        _request_timeout=params.get('_request_timeout'),
3733                                        collection_formats=collection_formats)
3734
3735    def get_template_html_definitions(self, account_id, template_id, **kwargs):
3736        """
3737        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3738        
3739        This method makes a synchronous HTTP request by default. To make an
3740        asynchronous HTTP request, please define a `callback` function
3741        to be invoked when receiving the response.
3742        >>> def callback_function(response):
3743        >>>     pprint(response)
3744        >>>
3745        >>> thread = api.get_template_html_definitions(account_id, template_id, callback=callback_function)
3746
3747        :param callback function: The callback function
3748            for asynchronous request. (optional)
3749        :param str account_id: The external account number (int) or account ID Guid. (required)
3750        :param str template_id: The ID of the template being accessed. (required)
3751        :return: DocumentHtmlDefinitionOriginals
3752                 If the method is called asynchronously,
3753                 returns the request thread.
3754        """
3755        kwargs['_return_http_data_only'] = True
3756        if kwargs.get('callback'):
3757            return self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3758        else:
3759            (data) = self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3760            return data
3761
3762    def get_template_html_definitions_with_http_info(self, account_id, template_id, **kwargs):
3763        """
3764        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3765        
3766        This method makes a synchronous HTTP request by default. To make an
3767        asynchronous HTTP request, please define a `callback` function
3768        to be invoked when receiving the response.
3769        >>> def callback_function(response):
3770        >>>     pprint(response)
3771        >>>
3772        >>> thread = api.get_template_html_definitions_with_http_info(account_id, template_id, callback=callback_function)
3773
3774        :param callback function: The callback function
3775            for asynchronous request. (optional)
3776        :param str account_id: The external account number (int) or account ID Guid. (required)
3777        :param str template_id: The ID of the template being accessed. (required)
3778        :return: DocumentHtmlDefinitionOriginals
3779                 If the method is called asynchronously,
3780                 returns the request thread.
3781        """
3782
3783        all_params = ['account_id', 'template_id']
3784        all_params.append('callback')
3785        all_params.append('_return_http_data_only')
3786        all_params.append('_preload_content')
3787        all_params.append('_request_timeout')
3788
3789        params = locals()
3790        for key, val in iteritems(params['kwargs']):
3791            if key not in all_params:
3792                raise TypeError(
3793                    "Got an unexpected keyword argument '%s'"
3794                    " to method get_template_html_definitions" % key
3795                )
3796            params[key] = val
3797        del params['kwargs']
3798        # verify the required parameter 'account_id' is set
3799        if ('account_id' not in params) or (params['account_id'] is None):
3800            raise ValueError("Missing the required parameter `account_id` when calling `get_template_html_definitions`")
3801        # verify the required parameter 'template_id' is set
3802        if ('template_id' not in params) or (params['template_id'] is None):
3803            raise ValueError("Missing the required parameter `template_id` when calling `get_template_html_definitions`")
3804
3805
3806        collection_formats = {}
3807
3808        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/html_definitions'.replace('{format}', 'json')
3809        path_params = {}
3810        if 'account_id' in params:
3811            path_params['accountId'] = params['account_id']
3812        if 'template_id' in params:
3813            path_params['templateId'] = params['template_id']
3814
3815        query_params = {}
3816
3817        header_params = {}
3818
3819        form_params = []
3820        local_var_files = {}
3821
3822        body_params = None
3823        # HTTP header `Accept`
3824        header_params['Accept'] = self.api_client.\
3825            select_header_accept(['application/json'])
3826
3827        # Authentication setting
3828        auth_settings = []
3829
3830        return self.api_client.call_api(resource_path, 'GET',
3831                                        path_params,
3832                                        query_params,
3833                                        header_params,
3834                                        body=body_params,
3835                                        post_params=form_params,
3836                                        files=local_var_files,
3837                                        response_type='DocumentHtmlDefinitionOriginals',
3838                                        auth_settings=auth_settings,
3839                                        callback=params.get('callback'),
3840                                        _return_http_data_only=params.get('_return_http_data_only'),
3841                                        _preload_content=params.get('_preload_content', True),
3842                                        _request_timeout=params.get('_request_timeout'),
3843                                        collection_formats=collection_formats)
3844
3845    def list_bulk_recipients(self, account_id, recipient_id, template_id, **kwargs):
3846        """
3847        Gets the bulk recipient file from a template.
3848        Retrieves the bulk recipient file information from a template that has a bulk recipient.
3849        This method makes a synchronous HTTP request by default. To make an
3850        asynchronous HTTP request, please define a `callback` function
3851        to be invoked when receiving the response.
3852        >>> def callback_function(response):
3853        >>>     pprint(response)
3854        >>>
3855        >>> thread = api.list_bulk_recipients(account_id, recipient_id, template_id, callback=callback_function)
3856
3857        :param callback function: The callback function
3858            for asynchronous request. (optional)
3859        :param str account_id: The external account number (int) or account ID Guid. (required)
3860        :param str recipient_id: The ID of the recipient being accessed. (required)
3861        :param str template_id: The ID of the template being accessed. (required)
3862        :param str include_tabs:
3863        :param str start_position:
3864        :return: BulkRecipientsResponse
3865                 If the method is called asynchronously,
3866                 returns the request thread.
3867        """
3868        kwargs['_return_http_data_only'] = True
3869        if kwargs.get('callback'):
3870            return self.list_bulk_recipients_with_http_info(account_id, recipient_id, template_id, **kwargs)
3871        else:
3872            (data) = self.list_bulk_recipients_with_http_info(account_id, recipient_id, template_id, **kwargs)
3873            return data
3874
3875    def list_bulk_recipients_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
3876        """
3877        Gets the bulk recipient file from a template.
3878        Retrieves the bulk recipient file information from a template that has a bulk recipient.
3879        This method makes a synchronous HTTP request by default. To make an
3880        asynchronous HTTP request, please define a `callback` function
3881        to be invoked when receiving the response.
3882        >>> def callback_function(response):
3883        >>>     pprint(response)
3884        >>>
3885        >>> thread = api.list_bulk_recipients_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
3886
3887        :param callback function: The callback function
3888            for asynchronous request. (optional)
3889        :param str account_id: The external account number (int) or account ID Guid. (required)
3890        :param str recipient_id: The ID of the recipient being accessed. (required)
3891        :param str template_id: The ID of the template being accessed. (required)
3892        :param str include_tabs:
3893        :param str start_position:
3894        :return: BulkRecipientsResponse
3895                 If the method is called asynchronously,
3896                 returns the request thread.
3897        """
3898
3899        all_params = ['account_id', 'recipient_id', 'template_id', 'include_tabs', 'start_position']
3900        all_params.append('callback')
3901        all_params.append('_return_http_data_only')
3902        all_params.append('_preload_content')
3903        all_params.append('_request_timeout')
3904
3905        params = locals()
3906        for key, val in iteritems(params['kwargs']):
3907            if key not in all_params:
3908                raise TypeError(
3909                    "Got an unexpected keyword argument '%s'"
3910                    " to method list_bulk_recipients" % key
3911                )
3912            params[key] = val
3913        del params['kwargs']
3914        # verify the required parameter 'account_id' is set
3915        if ('account_id' not in params) or (params['account_id'] is None):
3916            raise ValueError("Missing the required parameter `account_id` when calling `list_bulk_recipients`")
3917        # verify the required parameter 'recipient_id' is set
3918        if ('recipient_id' not in params) or (params['recipient_id'] is None):
3919            raise ValueError("Missing the required parameter `recipient_id` when calling `list_bulk_recipients`")
3920        # verify the required parameter 'template_id' is set
3921        if ('template_id' not in params) or (params['template_id'] is None):
3922            raise ValueError("Missing the required parameter `template_id` when calling `list_bulk_recipients`")
3923
3924
3925        collection_formats = {}
3926
3927        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/bulk_recipients'.replace('{format}', 'json')
3928        path_params = {}
3929        if 'account_id' in params:
3930            path_params['accountId'] = params['account_id']
3931        if 'recipient_id' in params:
3932            path_params['recipientId'] = params['recipient_id']
3933        if 'template_id' in params:
3934            path_params['templateId'] = params['template_id']
3935
3936        query_params = {}
3937        if 'include_tabs' in params:
3938            query_params['include_tabs'] = params['include_tabs']
3939        if 'start_position' in params:
3940            query_params['start_position'] = params['start_position']
3941
3942        header_params = {}
3943
3944        form_params = []
3945        local_var_files = {}
3946
3947        body_params = None
3948        # HTTP header `Accept`
3949        header_params['Accept'] = self.api_client.\
3950            select_header_accept(['application/json'])
3951
3952        # Authentication setting
3953        auth_settings = []
3954
3955        return self.api_client.call_api(resource_path, 'GET',
3956                                        path_params,
3957                                        query_params,
3958                                        header_params,
3959                                        body=body_params,
3960                                        post_params=form_params,
3961                                        files=local_var_files,
3962                                        response_type='BulkRecipientsResponse',
3963                                        auth_settings=auth_settings,
3964                                        callback=params.get('callback'),
3965                                        _return_http_data_only=params.get('_return_http_data_only'),
3966                                        _preload_content=params.get('_preload_content', True),
3967                                        _request_timeout=params.get('_request_timeout'),
3968                                        collection_formats=collection_formats)
3969
3970    def list_custom_fields(self, account_id, template_id, **kwargs):
3971        """
3972        Gets the custom document fields from a template.
3973        Retrieves the custom document field information from an existing template.
3974        This method makes a synchronous HTTP request by default. To make an
3975        asynchronous HTTP request, please define a `callback` function
3976        to be invoked when receiving the response.
3977        >>> def callback_function(response):
3978        >>>     pprint(response)
3979        >>>
3980        >>> thread = api.list_custom_fields(account_id, template_id, callback=callback_function)
3981
3982        :param callback function: The callback function
3983            for asynchronous request. (optional)
3984        :param str account_id: The external account number (int) or account ID Guid. (required)
3985        :param str template_id: The ID of the template being accessed. (required)
3986        :return: CustomFields
3987                 If the method is called asynchronously,
3988                 returns the request thread.
3989        """
3990        kwargs['_return_http_data_only'] = True
3991        if kwargs.get('callback'):
3992            return self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3993        else:
3994            (data) = self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3995            return data
3996
3997    def list_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
3998        """
3999        Gets the custom document fields from a template.
4000        Retrieves the custom document field information from an existing template.
4001        This method makes a synchronous HTTP request by default. To make an
4002        asynchronous HTTP request, please define a `callback` function
4003        to be invoked when receiving the response.
4004        >>> def callback_function(response):
4005        >>>     pprint(response)
4006        >>>
4007        >>> thread = api.list_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
4008
4009        :param callback function: The callback function
4010            for asynchronous request. (optional)
4011        :param str account_id: The external account number (int) or account ID Guid. (required)
4012        :param str template_id: The ID of the template being accessed. (required)
4013        :return: CustomFields
4014                 If the method is called asynchronously,
4015                 returns the request thread.
4016        """
4017
4018        all_params = ['account_id', 'template_id']
4019        all_params.append('callback')
4020        all_params.append('_return_http_data_only')
4021        all_params.append('_preload_content')
4022        all_params.append('_request_timeout')
4023
4024        params = locals()
4025        for key, val in iteritems(params['kwargs']):
4026            if key not in all_params:
4027                raise TypeError(
4028                    "Got an unexpected keyword argument '%s'"
4029                    " to method list_custom_fields" % key
4030                )
4031            params[key] = val
4032        del params['kwargs']
4033        # verify the required parameter 'account_id' is set
4034        if ('account_id' not in params) or (params['account_id'] is None):
4035            raise ValueError("Missing the required parameter `account_id` when calling `list_custom_fields`")
4036        # verify the required parameter 'template_id' is set
4037        if ('template_id' not in params) or (params['template_id'] is None):
4038            raise ValueError("Missing the required parameter `template_id` when calling `list_custom_fields`")
4039
4040
4041        collection_formats = {}
4042
4043        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
4044        path_params = {}
4045        if 'account_id' in params:
4046            path_params['accountId'] = params['account_id']
4047        if 'template_id' in params:
4048            path_params['templateId'] = params['template_id']
4049
4050        query_params = {}
4051
4052        header_params = {}
4053
4054        form_params = []
4055        local_var_files = {}
4056
4057        body_params = None
4058        # HTTP header `Accept`
4059        header_params['Accept'] = self.api_client.\
4060            select_header_accept(['application/json'])
4061
4062        # Authentication setting
4063        auth_settings = []
4064
4065        return self.api_client.call_api(resource_path, 'GET',
4066                                        path_params,
4067                                        query_params,
4068                                        header_params,
4069                                        body=body_params,
4070                                        post_params=form_params,
4071                                        files=local_var_files,
4072                                        response_type='CustomFields',
4073                                        auth_settings=auth_settings,
4074                                        callback=params.get('callback'),
4075                                        _return_http_data_only=params.get('_return_http_data_only'),
4076                                        _preload_content=params.get('_preload_content', True),
4077                                        _request_timeout=params.get('_request_timeout'),
4078                                        collection_formats=collection_formats)
4079
4080    def list_document_fields(self, account_id, document_id, template_id, **kwargs):
4081        """
4082        Gets the custom document fields for a an existing template document.
4083        Retrieves the custom document fields for an existing template document.
4084        This method makes a synchronous HTTP request by default. To make an
4085        asynchronous HTTP request, please define a `callback` function
4086        to be invoked when receiving the response.
4087        >>> def callback_function(response):
4088        >>>     pprint(response)
4089        >>>
4090        >>> thread = api.list_document_fields(account_id, document_id, template_id, callback=callback_function)
4091
4092        :param callback function: The callback function
4093            for asynchronous request. (optional)
4094        :param str account_id: The external account number (int) or account ID Guid. (required)
4095        :param str document_id: The ID of the document being accessed. (required)
4096        :param str template_id: The ID of the template being accessed. (required)
4097        :return: DocumentFieldsInformation
4098                 If the method is called asynchronously,
4099                 returns the request thread.
4100        """
4101        kwargs['_return_http_data_only'] = True
4102        if kwargs.get('callback'):
4103            return self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
4104        else:
4105            (data) = self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
4106            return data
4107
4108    def list_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
4109        """
4110        Gets the custom document fields for a an existing template document.
4111        Retrieves the custom document fields for an existing template document.
4112        This method makes a synchronous HTTP request by default. To make an
4113        asynchronous HTTP request, please define a `callback` function
4114        to be invoked when receiving the response.
4115        >>> def callback_function(response):
4116        >>>     pprint(response)
4117        >>>
4118        >>> thread = api.list_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
4119
4120        :param callback function: The callback function
4121            for asynchronous request. (optional)
4122        :param str account_id: The external account number (int) or account ID Guid. (required)
4123        :param str document_id: The ID of the document being accessed. (required)
4124        :param str template_id: The ID of the template being accessed. (required)
4125        :return: DocumentFieldsInformation
4126                 If the method is called asynchronously,
4127                 returns the request thread.
4128        """
4129
4130        all_params = ['account_id', 'document_id', 'template_id']
4131        all_params.append('callback')
4132        all_params.append('_return_http_data_only')
4133        all_params.append('_preload_content')
4134        all_params.append('_request_timeout')
4135
4136        params = locals()
4137        for key, val in iteritems(params['kwargs']):
4138            if key not in all_params:
4139                raise TypeError(
4140                    "Got an unexpected keyword argument '%s'"
4141                    " to method list_document_fields" % key
4142                )
4143            params[key] = val
4144        del params['kwargs']
4145        # verify the required parameter 'account_id' is set
4146        if ('account_id' not in params) or (params['account_id'] is None):
4147            raise ValueError("Missing the required parameter `account_id` when calling `list_document_fields`")
4148        # verify the required parameter 'document_id' is set
4149        if ('document_id' not in params) or (params['document_id'] is None):
4150            raise ValueError("Missing the required parameter `document_id` when calling `list_document_fields`")
4151        # verify the required parameter 'template_id' is set
4152        if ('template_id' not in params) or (params['template_id'] is None):
4153            raise ValueError("Missing the required parameter `template_id` when calling `list_document_fields`")
4154
4155
4156        collection_formats = {}
4157
4158        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
4159        path_params = {}
4160        if 'account_id' in params:
4161            path_params['accountId'] = params['account_id']
4162        if 'document_id' in params:
4163            path_params['documentId'] = params['document_id']
4164        if 'template_id' in params:
4165            path_params['templateId'] = params['template_id']
4166
4167        query_params = {}
4168
4169        header_params = {}
4170
4171        form_params = []
4172        local_var_files = {}
4173
4174        body_params = None
4175        # HTTP header `Accept`
4176        header_params['Accept'] = self.api_client.\
4177            select_header_accept(['application/json'])
4178
4179        # Authentication setting
4180        auth_settings = []
4181
4182        return self.api_client.call_api(resource_path, 'GET',
4183                                        path_params,
4184                                        query_params,
4185                                        header_params,
4186                                        body=body_params,
4187                                        post_params=form_params,
4188                                        files=local_var_files,
4189                                        response_type='DocumentFieldsInformation',
4190                                        auth_settings=auth_settings,
4191                                        callback=params.get('callback'),
4192                                        _return_http_data_only=params.get('_return_http_data_only'),
4193                                        _preload_content=params.get('_preload_content', True),
4194                                        _request_timeout=params.get('_request_timeout'),
4195                                        collection_formats=collection_formats)
4196
4197    def list_documents(self, account_id, template_id, **kwargs):
4198        """
4199        Gets a list of documents associated with a template.
4200        Retrieves a list of documents associated with the specified template.
4201        This method makes a synchronous HTTP request by default. To make an
4202        asynchronous HTTP request, please define a `callback` function
4203        to be invoked when receiving the response.
4204        >>> def callback_function(response):
4205        >>>     pprint(response)
4206        >>>
4207        >>> thread = api.list_documents(account_id, template_id, callback=callback_function)
4208
4209        :param callback function: The callback function
4210            for asynchronous request. (optional)
4211        :param str account_id: The external account number (int) or account ID Guid. (required)
4212        :param str template_id: The ID of the template being accessed. (required)
4213        :param str include_tabs:
4214        :return: TemplateDocumentsResult
4215                 If the method is called asynchronously,
4216                 returns the request thread.
4217        """
4218        kwargs['_return_http_data_only'] = True
4219        if kwargs.get('callback'):
4220            return self.list_documents_with_http_info(account_id, template_id, **kwargs)
4221        else:
4222            (data) = self.list_documents_with_http_info(account_id, template_id, **kwargs)
4223            return data
4224
4225    def list_documents_with_http_info(self, account_id, template_id, **kwargs):
4226        """
4227        Gets a list of documents associated with a template.
4228        Retrieves a list of documents associated with the specified template.
4229        This method makes a synchronous HTTP request by default. To make an
4230        asynchronous HTTP request, please define a `callback` function
4231        to be invoked when receiving the response.
4232        >>> def callback_function(response):
4233        >>>     pprint(response)
4234        >>>
4235        >>> thread = api.list_documents_with_http_info(account_id, template_id, callback=callback_function)
4236
4237        :param callback function: The callback function
4238            for asynchronous request. (optional)
4239        :param str account_id: The external account number (int) or account ID Guid. (required)
4240        :param str template_id: The ID of the template being accessed. (required)
4241        :param str include_tabs:
4242        :return: TemplateDocumentsResult
4243                 If the method is called asynchronously,
4244                 returns the request thread.
4245        """
4246
4247        all_params = ['account_id', 'template_id', 'include_tabs']
4248        all_params.append('callback')
4249        all_params.append('_return_http_data_only')
4250        all_params.append('_preload_content')
4251        all_params.append('_request_timeout')
4252
4253        params = locals()
4254        for key, val in iteritems(params['kwargs']):
4255            if key not in all_params:
4256                raise TypeError(
4257                    "Got an unexpected keyword argument '%s'"
4258                    " to method list_documents" % key
4259                )
4260            params[key] = val
4261        del params['kwargs']
4262        # verify the required parameter 'account_id' is set
4263        if ('account_id' not in params) or (params['account_id'] is None):
4264            raise ValueError("Missing the required parameter `account_id` when calling `list_documents`")
4265        # verify the required parameter 'template_id' is set
4266        if ('template_id' not in params) or (params['template_id'] is None):
4267            raise ValueError("Missing the required parameter `template_id` when calling `list_documents`")
4268
4269
4270        collection_formats = {}
4271
4272        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
4273        path_params = {}
4274        if 'account_id' in params:
4275            path_params['accountId'] = params['account_id']
4276        if 'template_id' in params:
4277            path_params['templateId'] = params['template_id']
4278
4279        query_params = {}
4280        if 'include_tabs' in params:
4281            query_params['include_tabs'] = params['include_tabs']
4282
4283        header_params = {}
4284
4285        form_params = []
4286        local_var_files = {}
4287
4288        body_params = None
4289        # HTTP header `Accept`
4290        header_params['Accept'] = self.api_client.\
4291            select_header_accept(['application/json'])
4292
4293        # Authentication setting
4294        auth_settings = []
4295
4296        return self.api_client.call_api(resource_path, 'GET',
4297                                        path_params,
4298                                        query_params,
4299                                        header_params,
4300                                        body=body_params,
4301                                        post_params=form_params,
4302                                        files=local_var_files,
4303                                        response_type='TemplateDocumentsResult',
4304                                        auth_settings=auth_settings,
4305                                        callback=params.get('callback'),
4306                                        _return_http_data_only=params.get('_return_http_data_only'),
4307                                        _preload_content=params.get('_preload_content', True),
4308                                        _request_timeout=params.get('_request_timeout'),
4309                                        collection_formats=collection_formats)
4310
4311    def list_recipients(self, account_id, template_id, **kwargs):
4312        """
4313        Gets recipient information from a template.
4314        Retrieves the information for all recipients in the specified template.
4315        This method makes a synchronous HTTP request by default. To make an
4316        asynchronous HTTP request, please define a `callback` function
4317        to be invoked when receiving the response.
4318        >>> def callback_function(response):
4319        >>>     pprint(response)
4320        >>>
4321        >>> thread = api.list_recipients(account_id, template_id, callback=callback_function)
4322
4323        :param callback function: The callback function
4324            for asynchronous request. (optional)
4325        :param str account_id: The external account number (int) or account ID Guid. (required)
4326        :param str template_id: The ID of the template being accessed. (required)
4327        :param str include_anchor_tab_locations:  When set to **true** and `include_tabs` is set to **true**, all tabs with anchor tab properties are included in the response. 
4328        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4329        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4330        :return: Recipients
4331                 If the method is called asynchronously,
4332                 returns the request thread.
4333        """
4334        kwargs['_return_http_data_only'] = True
4335        if kwargs.get('callback'):
4336            return self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4337        else:
4338            (data) = self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4339            return data
4340
4341    def list_recipients_with_http_info(self, account_id, template_id, **kwargs):
4342        """
4343        Gets recipient information from a template.
4344        Retrieves the information for all recipients in the specified template.
4345        This method makes a synchronous HTTP request by default. To make an
4346        asynchronous HTTP request, please define a `callback` function
4347        to be invoked when receiving the response.
4348        >>> def callback_function(response):
4349        >>>     pprint(response)
4350        >>>
4351        >>> thread = api.list_recipients_with_http_info(account_id, template_id, callback=callback_function)
4352
4353        :param callback function: The callback function
4354            for asynchronous request. (optional)
4355        :param str account_id: The external account number (int) or account ID Guid. (required)
4356        :param str template_id: The ID of the template being accessed. (required)
4357        :param str include_anchor_tab_locations:  When set to **true** and `include_tabs` is set to **true**, all tabs with anchor tab properties are included in the response. 
4358        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4359        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4360        :return: Recipients
4361                 If the method is called asynchronously,
4362                 returns the request thread.
4363        """
4364
4365        all_params = ['account_id', 'template_id', 'include_anchor_tab_locations', 'include_extended', 'include_tabs']
4366        all_params.append('callback')
4367        all_params.append('_return_http_data_only')
4368        all_params.append('_preload_content')
4369        all_params.append('_request_timeout')
4370
4371        params = locals()
4372        for key, val in iteritems(params['kwargs']):
4373            if key not in all_params:
4374                raise TypeError(
4375                    "Got an unexpected keyword argument '%s'"
4376                    " to method list_recipients" % key
4377                )
4378            params[key] = val
4379        del params['kwargs']
4380        # verify the required parameter 'account_id' is set
4381        if ('account_id' not in params) or (params['account_id'] is None):
4382            raise ValueError("Missing the required parameter `account_id` when calling `list_recipients`")
4383        # verify the required parameter 'template_id' is set
4384        if ('template_id' not in params) or (params['template_id'] is None):
4385            raise ValueError("Missing the required parameter `template_id` when calling `list_recipients`")
4386
4387
4388        collection_formats = {}
4389
4390        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
4391        path_params = {}
4392        if 'account_id' in params:
4393            path_params['accountId'] = params['account_id']
4394        if 'template_id' in params:
4395            path_params['templateId'] = params['template_id']
4396
4397        query_params = {}
4398        if 'include_anchor_tab_locations' in params:
4399            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4400        if 'include_extended' in params:
4401            query_params['include_extended'] = params['include_extended']
4402        if 'include_tabs' in params:
4403            query_params['include_tabs'] = params['include_tabs']
4404
4405        header_params = {}
4406
4407        form_params = []
4408        local_var_files = {}
4409
4410        body_params = None
4411        # HTTP header `Accept`
4412        header_params['Accept'] = self.api_client.\
4413            select_header_accept(['application/json'])
4414
4415        # Authentication setting
4416        auth_settings = []
4417
4418        return self.api_client.call_api(resource_path, 'GET',
4419                                        path_params,
4420                                        query_params,
4421                                        header_params,
4422                                        body=body_params,
4423                                        post_params=form_params,
4424                                        files=local_var_files,
4425                                        response_type='Recipients',
4426                                        auth_settings=auth_settings,
4427                                        callback=params.get('callback'),
4428                                        _return_http_data_only=params.get('_return_http_data_only'),
4429                                        _preload_content=params.get('_preload_content', True),
4430                                        _request_timeout=params.get('_request_timeout'),
4431                                        collection_formats=collection_formats)
4432
4433    def list_tabs(self, account_id, recipient_id, template_id, **kwargs):
4434        """
4435        Gets the tabs information for a signer or sign-in-person recipient in a template.
4436        Gets the tabs information for a signer or sign-in-person recipient in a template.
4437        This method makes a synchronous HTTP request by default. To make an
4438        asynchronous HTTP request, please define a `callback` function
4439        to be invoked when receiving the response.
4440        >>> def callback_function(response):
4441        >>>     pprint(response)
4442        >>>
4443        >>> thread = api.list_tabs(account_id, recipient_id, template_id, callback=callback_function)
4444
4445        :param callback function: The callback function
4446            for asynchronous request. (optional)
4447        :param str account_id: The external account number (int) or account ID Guid. (required)
4448        :param str recipient_id: The ID of the recipient being accessed. (required)
4449        :param str template_id: The ID of the template being accessed. (required)
4450        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4451        :param str include_metadata:
4452        :return: Tabs
4453                 If the method is called asynchronously,
4454                 returns the request thread.
4455        """
4456        kwargs['_return_http_data_only'] = True
4457        if kwargs.get('callback'):
4458            return self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4459        else:
4460            (data) = self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4461            return data
4462
4463    def list_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
4464        """
4465        Gets the tabs information for a signer or sign-in-person recipient in a template.
4466        Gets the tabs information for a signer or sign-in-person recipient in a template.
4467        This method makes a synchronous HTTP request by default. To make an
4468        asynchronous HTTP request, please define a `callback` function
4469        to be invoked when receiving the response.
4470        >>> def callback_function(response):
4471        >>>     pprint(response)
4472        >>>
4473        >>> thread = api.list_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
4474
4475        :param callback function: The callback function
4476            for asynchronous request. (optional)
4477        :param str account_id: The external account number (int) or account ID Guid. (required)
4478        :param str recipient_id: The ID of the recipient being accessed. (required)
4479        :param str template_id: The ID of the template being accessed. (required)
4480        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4481        :param str include_metadata:
4482        :return: Tabs
4483                 If the method is called asynchronously,
4484                 returns the request thread.
4485        """
4486
4487        all_params = ['account_id', 'recipient_id', 'template_id', 'include_anchor_tab_locations', 'include_metadata']
4488        all_params.append('callback')
4489        all_params.append('_return_http_data_only')
4490        all_params.append('_preload_content')
4491        all_params.append('_request_timeout')
4492
4493        params = locals()
4494        for key, val in iteritems(params['kwargs']):
4495            if key not in all_params:
4496                raise TypeError(
4497                    "Got an unexpected keyword argument '%s'"
4498                    " to method list_tabs" % key
4499                )
4500            params[key] = val
4501        del params['kwargs']
4502        # verify the required parameter 'account_id' is set
4503        if ('account_id' not in params) or (params['account_id'] is None):
4504            raise ValueError("Missing the required parameter `account_id` when calling `list_tabs`")
4505        # verify the required parameter 'recipient_id' is set
4506        if ('recipient_id' not in params) or (params['recipient_id'] is None):
4507            raise ValueError("Missing the required parameter `recipient_id` when calling `list_tabs`")
4508        # verify the required parameter 'template_id' is set
4509        if ('template_id' not in params) or (params['template_id'] is None):
4510            raise ValueError("Missing the required parameter `template_id` when calling `list_tabs`")
4511
4512
4513        collection_formats = {}
4514
4515        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
4516        path_params = {}
4517        if 'account_id' in params:
4518            path_params['accountId'] = params['account_id']
4519        if 'recipient_id' in params:
4520            path_params['recipientId'] = params['recipient_id']
4521        if 'template_id' in params:
4522            path_params['templateId'] = params['template_id']
4523
4524        query_params = {}
4525        if 'include_anchor_tab_locations' in params:
4526            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4527        if 'include_metadata' in params:
4528            query_params['include_metadata'] = params['include_metadata']
4529
4530        header_params = {}
4531
4532        form_params = []
4533        local_var_files = {}
4534
4535        body_params = None
4536        # HTTP header `Accept`
4537        header_params['Accept'] = self.api_client.\
4538            select_header_accept(['application/json'])
4539
4540        # Authentication setting
4541        auth_settings = []
4542
4543        return self.api_client.call_api(resource_path, 'GET',
4544                                        path_params,
4545                                        query_params,
4546                                        header_params,
4547                                        body=body_params,
4548                                        post_params=form_params,
4549                                        files=local_var_files,
4550                                        response_type='Tabs',
4551                                        auth_settings=auth_settings,
4552                                        callback=params.get('callback'),
4553                                        _return_http_data_only=params.get('_return_http_data_only'),
4554                                        _preload_content=params.get('_preload_content', True),
4555                                        _request_timeout=params.get('_request_timeout'),
4556                                        collection_formats=collection_formats)
4557
4558    def list_templates(self, account_id, **kwargs):
4559        """
4560        Gets the definition of a template.
4561        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4562        This method makes a synchronous HTTP request by default. To make an
4563        asynchronous HTTP request, please define a `callback` function
4564        to be invoked when receiving the response.
4565        >>> def callback_function(response):
4566        >>>     pprint(response)
4567        >>>
4568        >>> thread = api.list_templates(account_id, callback=callback_function)
4569
4570        :param callback function: The callback function
4571            for asynchronous request. (optional)
4572        :param str account_id: The external account number (int) or account ID Guid. (required)
4573        :param str count: Number of records to return in the cache.
4574        :param str created_from_date:
4575        :param str created_to_date:
4576        :param str folder_ids: A comma separated list of folder ID GUIDs.
4577        :param str folder_types:
4578        :param str from_date: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
4579        :param str include: A comma separated list of additional template attributes to include in the response. Valid values are: recipients, folders, documents, custom_fields, and notifications.
4580        :param str is_deleted_template_only:
4581        :param str is_download:
4582        :param str modified_from_date:
4583        :param str modified_to_date:
4584        :param str order: Sets the direction order used to sort the list. Valid values are: -asc = ascending sort order (a to z)  -desc = descending sort order (z to a)
4585        :param str order_by: Sets the file attribute used to sort the list. Valid values are:  -name: template name  -modified: date/time template was last modified.  -used: date/time the template was last used.
4586        :param str search_fields:
4587        :param str search_text: The search text used to search the names of templates.
4588        :param str shared_by_me: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
4589        :param str start_position: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
4590        :param str template_ids:
4591        :param str to_date: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
4592        :param str used_from_date: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
4593        :param str used_to_date: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
4594        :param str user_filter: Sets if the templates shown in the response Valid values are:  -owned_by_me: only shows templates the user owns.  -shared_with_me: only shows templates that are shared with the user.  -all: shows all templates owned or shared with the user.
4595        :param str user_id:
4596        :return: EnvelopeTemplateResults
4597                 If the method is called asynchronously,
4598                 returns the request thread.
4599        """
4600        kwargs['_return_http_data_only'] = True
4601        if kwargs.get('callback'):
4602            return self.list_templates_with_http_info(account_id, **kwargs)
4603        else:
4604            (data) = self.list_templates_with_http_info(account_id, **kwargs)
4605            return data
4606
4607    def list_templates_with_http_info(self, account_id, **kwargs):
4608        """
4609        Gets the definition of a template.
4610        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4611        This method makes a synchronous HTTP request by default. To make an
4612        asynchronous HTTP request, please define a `callback` function
4613        to be invoked when receiving the response.
4614        >>> def callback_function(response):
4615        >>>     pprint(response)
4616        >>>
4617        >>> thread = api.list_templates_with_http_info(account_id, callback=callback_function)
4618
4619        :param callback function: The callback function
4620            for asynchronous request. (optional)
4621        :param str account_id: The external account number (int) or account ID Guid. (required)
4622        :param str count: Number of records to return in the cache.
4623        :param str created_from_date:
4624        :param str created_to_date:
4625        :param str folder_ids: A comma separated list of folder ID GUIDs.
4626        :param str folder_types:
4627        :param str from_date: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
4628        :param str include: A comma separated list of additional template attributes to include in the response. Valid values are: recipients, folders, documents, custom_fields, and notifications.
4629        :param str is_deleted_template_only:
4630        :param str is_download:
4631        :param str modified_from_date:
4632        :param str modified_to_date:
4633        :param str order: Sets the direction order used to sort the list. Valid values are: -asc = ascending sort order (a to z)  -desc = descending sort order (z to a)
4634        :param str order_by: Sets the file attribute used to sort the list. Valid values are:  -name: template name  -modified: date/time template was last modified.  -used: date/time the template was last used.
4635        :param str search_fields:
4636        :param str search_text: The search text used to search the names of templates.
4637        :param str shared_by_me: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
4638        :param str start_position: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
4639        :param str template_ids:
4640        :param str to_date: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
4641        :param str used_from_date: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
4642        :param str used_to_date: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
4643        :param str user_filter: Sets if the templates shown in the response Valid values are:  -owned_by_me: only shows templates the user owns.  -shared_with_me: only shows templates that are shared with the user.  -all: shows all templates owned or shared with the user.
4644        :param str user_id:
4645        :return: EnvelopeTemplateResults
4646                 If the method is called asynchronously,
4647                 returns the request thread.
4648        """
4649
4650        all_params = ['account_id', 'count', 'created_from_date', 'created_to_date', 'folder_ids', 'folder_types', 'from_date', 'include', 'is_deleted_template_only', 'is_download', 'modified_from_date', 'modified_to_date', 'order', 'order_by', 'search_fields', 'search_text', 'shared_by_me', 'start_position', 'template_ids', 'to_date', 'used_from_date', 'used_to_date', 'user_filter', 'user_id']
4651        all_params.append('callback')
4652        all_params.append('_return_http_data_only')
4653        all_params.append('_preload_content')
4654        all_params.append('_request_timeout')
4655
4656        params = locals()
4657        for key, val in iteritems(params['kwargs']):
4658            if key not in all_params:
4659                raise TypeError(
4660                    "Got an unexpected keyword argument '%s'"
4661                    " to method list_templates" % key
4662                )
4663            params[key] = val
4664        del params['kwargs']
4665        # verify the required parameter 'account_id' is set
4666        if ('account_id' not in params) or (params['account_id'] is None):
4667            raise ValueError("Missing the required parameter `account_id` when calling `list_templates`")
4668
4669
4670        collection_formats = {}
4671
4672        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
4673        path_params = {}
4674        if 'account_id' in params:
4675            path_params['accountId'] = params['account_id']
4676
4677        query_params = {}
4678        if 'count' in params:
4679            query_params['count'] = params['count']
4680        if 'created_from_date' in params:
4681            query_params['created_from_date'] = params['created_from_date']
4682        if 'created_to_date' in params:
4683            query_params['created_to_date'] = params['created_to_date']
4684        if 'folder_ids' in params:
4685            query_params['folder_ids'] = params['folder_ids']
4686        if 'folder_types' in params:
4687            query_params['folder_types'] = params['folder_types']
4688        if 'from_date' in params:
4689            query_params['from_date'] = params['from_date']
4690        if 'include' in params:
4691            query_params['include'] = params['include']
4692        if 'is_deleted_template_only' in params:
4693            query_params['is_deleted_template_only'] = params['is_deleted_template_only']
4694        if 'is_download' in params:
4695            query_params['is_download'] = params['is_download']
4696        if 'modified_from_date' in params:
4697            query_params['modified_from_date'] = params['modified_from_date']
4698        if 'modified_to_date' in params:
4699            query_params['modified_to_date'] = params['modified_to_date']
4700        if 'order' in params:
4701            query_params['order'] = params['order']
4702        if 'order_by' in params:
4703            query_params['order_by'] = params['order_by']
4704        if 'search_fields' in params:
4705            query_params['search_fields'] = params['search_fields']
4706        if 'search_text' in params:
4707            query_params['search_text'] = params['search_text']
4708        if 'shared_by_me' in params:
4709            query_params['shared_by_me'] = params['shared_by_me']
4710        if 'start_position' in params:
4711            query_params['start_position'] = params['start_position']
4712        if 'template_ids' in params:
4713            query_params['template_ids'] = params['template_ids']
4714        if 'to_date' in params:
4715            query_params['to_date'] = params['to_date']
4716        if 'used_from_date' in params:
4717            query_params['used_from_date'] = params['used_from_date']
4718        if 'used_to_date' in params:
4719            query_params['used_to_date'] = params['used_to_date']
4720        if 'user_filter' in params:
4721            query_params['user_filter'] = params['user_filter']
4722        if 'user_id' in params:
4723            query_params['user_id'] = params['user_id']
4724
4725        header_params = {}
4726
4727        form_params = []
4728        local_var_files = {}
4729
4730        body_params = None
4731        # HTTP header `Accept`
4732        header_params['Accept'] = self.api_client.\
4733            select_header_accept(['application/json'])
4734
4735        # Authentication setting
4736        auth_settings = []
4737
4738        return self.api_client.call_api(resource_path, 'GET',
4739                                        path_params,
4740                                        query_params,
4741                                        header_params,
4742                                        body=body_params,
4743                                        post_params=form_params,
4744                                        files=local_var_files,
4745                                        response_type='EnvelopeTemplateResults',
4746                                        auth_settings=auth_settings,
4747                                        callback=params.get('callback'),
4748                                        _return_http_data_only=params.get('_return_http_data_only'),
4749                                        _preload_content=params.get('_preload_content', True),
4750                                        _request_timeout=params.get('_request_timeout'),
4751                                        collection_formats=collection_formats)
4752
4753    def rotate_document_page(self, account_id, document_id, page_number, template_id, **kwargs):
4754        """
4755        Rotates page image from a template for display.
4756        Rotates page image from a template for display. The page image can be rotated to the left or right.
4757        This method makes a synchronous HTTP request by default. To make an
4758        asynchronous HTTP request, please define a `callback` function
4759        to be invoked when receiving the response.
4760        >>> def callback_function(response):
4761        >>>     pprint(response)
4762        >>>
4763        >>> thread = api.rotate_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
4764
4765        :param callback function: The callback function
4766            for asynchronous request. (optional)
4767        :param str account_id: The external account number (int) or account ID Guid. (required)
4768        :param str document_id: The ID of the document being accessed. (required)
4769        :param str page_number: The page number being accessed. (required)
4770        :param str template_id: The ID of the template being accessed. (required)
4771        :param PageRequest page_request:
4772        :return: None
4773                 If the method is called asynchronously,
4774                 returns the request thread.
4775        """
4776        kwargs['_return_http_data_only'] = True
4777        if kwargs.get('callback'):
4778            return self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4779        else:
4780            (data) = self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4781            return data
4782
4783    def rotate_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
4784        """
4785        Rotates page image from a template for display.
4786        Rotates page image from a template for display. The page image can be rotated to the left or right.
4787        This method makes a synchronous HTTP request by default. To make an
4788        asynchronous HTTP request, please define a `callback` function
4789        to be invoked when receiving the response.
4790        >>> def callback_function(response):
4791        >>>     pprint(response)
4792        >>>
4793        >>> thread = api.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
4794
4795        :param callback function: The callback function
4796            for asynchronous request. (optional)
4797        :param str account_id: The external account number (int) or account ID Guid. (required)
4798        :param str document_id: The ID of the document being accessed. (required)
4799        :param str page_number: The page number being accessed. (required)
4800        :param str template_id: The ID of the template being accessed. (required)
4801        :param PageRequest page_request:
4802        :return: None
4803                 If the method is called asynchronously,
4804                 returns the request thread.
4805        """
4806
4807        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request']
4808        all_params.append('callback')
4809        all_params.append('_return_http_data_only')
4810        all_params.append('_preload_content')
4811        all_params.append('_request_timeout')
4812
4813        params = locals()
4814        for key, val in iteritems(params['kwargs']):
4815            if key not in all_params:
4816                raise TypeError(
4817                    "Got an unexpected keyword argument '%s'"
4818                    " to method rotate_document_page" % key
4819                )
4820            params[key] = val
4821        del params['kwargs']
4822        # verify the required parameter 'account_id' is set
4823        if ('account_id' not in params) or (params['account_id'] is None):
4824            raise ValueError("Missing the required parameter `account_id` when calling `rotate_document_page`")
4825        # verify the required parameter 'document_id' is set
4826        if ('document_id' not in params) or (params['document_id'] is None):
4827            raise ValueError("Missing the required parameter `document_id` when calling `rotate_document_page`")
4828        # verify the required parameter 'page_number' is set
4829        if ('page_number' not in params) or (params['page_number'] is None):
4830            raise ValueError("Missing the required parameter `page_number` when calling `rotate_document_page`")
4831        # verify the required parameter 'template_id' is set
4832        if ('template_id' not in params) or (params['template_id'] is None):
4833            raise ValueError("Missing the required parameter `template_id` when calling `rotate_document_page`")
4834
4835
4836        collection_formats = {}
4837
4838        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
4839        path_params = {}
4840        if 'account_id' in params:
4841            path_params['accountId'] = params['account_id']
4842        if 'document_id' in params:
4843            path_params['documentId'] = params['document_id']
4844        if 'page_number' in params:
4845            path_params['pageNumber'] = params['page_number']
4846        if 'template_id' in params:
4847            path_params['templateId'] = params['template_id']
4848
4849        query_params = {}
4850
4851        header_params = {}
4852
4853        form_params = []
4854        local_var_files = {}
4855
4856        body_params = None
4857        if 'page_request' in params:
4858            body_params = params['page_request']
4859        # HTTP header `Accept`
4860        header_params['Accept'] = self.api_client.\
4861            select_header_accept(['application/json'])
4862
4863        # Authentication setting
4864        auth_settings = []
4865
4866        return self.api_client.call_api(resource_path, 'PUT',
4867                                        path_params,
4868                                        query_params,
4869                                        header_params,
4870                                        body=body_params,
4871                                        post_params=form_params,
4872                                        files=local_var_files,
4873                                        response_type=None,
4874                                        auth_settings=auth_settings,
4875                                        callback=params.get('callback'),
4876                                        _return_http_data_only=params.get('_return_http_data_only'),
4877                                        _preload_content=params.get('_preload_content', True),
4878                                        _request_timeout=params.get('_request_timeout'),
4879                                        collection_formats=collection_formats)
4880
4881    def update(self, account_id, template_id, **kwargs):
4882        """
4883        Updates an existing template.
4884        Updates an existing template.
4885        This method makes a synchronous HTTP request by default. To make an
4886        asynchronous HTTP request, please define a `callback` function
4887        to be invoked when receiving the response.
4888        >>> def callback_function(response):
4889        >>>     pprint(response)
4890        >>>
4891        >>> thread = api.update(account_id, template_id, callback=callback_function)
4892
4893        :param callback function: The callback function
4894            for asynchronous request. (optional)
4895        :param str account_id: The external account number (int) or account ID Guid. (required)
4896        :param str template_id: The ID of the template being accessed. (required)
4897        :param EnvelopeTemplate envelope_template:
4898        :return: TemplateUpdateSummary
4899                 If the method is called asynchronously,
4900                 returns the request thread.
4901        """
4902        kwargs['_return_http_data_only'] = True
4903        if kwargs.get('callback'):
4904            return self.update_with_http_info(account_id, template_id, **kwargs)
4905        else:
4906            (data) = self.update_with_http_info(account_id, template_id, **kwargs)
4907            return data
4908
4909    def update_with_http_info(self, account_id, template_id, **kwargs):
4910        """
4911        Updates an existing template.
4912        Updates an existing template.
4913        This method makes a synchronous HTTP request by default. To make an
4914        asynchronous HTTP request, please define a `callback` function
4915        to be invoked when receiving the response.
4916        >>> def callback_function(response):
4917        >>>     pprint(response)
4918        >>>
4919        >>> thread = api.update_with_http_info(account_id, template_id, callback=callback_function)
4920
4921        :param callback function: The callback function
4922            for asynchronous request. (optional)
4923        :param str account_id: The external account number (int) or account ID Guid. (required)
4924        :param str template_id: The ID of the template being accessed. (required)
4925        :param EnvelopeTemplate envelope_template:
4926        :return: TemplateUpdateSummary
4927                 If the method is called asynchronously,
4928                 returns the request thread.
4929        """
4930
4931        all_params = ['account_id', 'template_id', 'envelope_template']
4932        all_params.append('callback')
4933        all_params.append('_return_http_data_only')
4934        all_params.append('_preload_content')
4935        all_params.append('_request_timeout')
4936
4937        params = locals()
4938        for key, val in iteritems(params['kwargs']):
4939            if key not in all_params:
4940                raise TypeError(
4941                    "Got an unexpected keyword argument '%s'"
4942                    " to method update" % key
4943                )
4944            params[key] = val
4945        del params['kwargs']
4946        # verify the required parameter 'account_id' is set
4947        if ('account_id' not in params) or (params['account_id'] is None):
4948            raise ValueError("Missing the required parameter `account_id` when calling `update`")
4949        # verify the required parameter 'template_id' is set
4950        if ('template_id' not in params) or (params['template_id'] is None):
4951            raise ValueError("Missing the required parameter `template_id` when calling `update`")
4952
4953
4954        collection_formats = {}
4955
4956        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json')
4957        path_params = {}
4958        if 'account_id' in params:
4959            path_params['accountId'] = params['account_id']
4960        if 'template_id' in params:
4961            path_params['templateId'] = params['template_id']
4962
4963        query_params = {}
4964
4965        header_params = {}
4966
4967        form_params = []
4968        local_var_files = {}
4969
4970        body_params = None
4971        if 'envelope_template' in params:
4972            body_params = params['envelope_template']
4973        # HTTP header `Accept`
4974        header_params['Accept'] = self.api_client.\
4975            select_header_accept(['application/json'])
4976
4977        # Authentication setting
4978        auth_settings = []
4979
4980        return self.api_client.call_api(resource_path, 'PUT',
4981                                        path_params,
4982                                        query_params,
4983                                        header_params,
4984                                        body=body_params,
4985                                        post_params=form_params,
4986                                        files=local_var_files,
4987                                        response_type='TemplateUpdateSummary',
4988                                        auth_settings=auth_settings,
4989                                        callback=params.get('callback'),
4990                                        _return_http_data_only=params.get('_return_http_data_only'),
4991                                        _preload_content=params.get('_preload_content', True),
4992                                        _request_timeout=params.get('_request_timeout'),
4993                                        collection_formats=collection_formats)
4994
4995    def update_custom_fields(self, account_id, template_id, **kwargs):
4996        """
4997        Updates envelope custom fields in a template.
4998        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
4999        This method makes a synchronous HTTP request by default. To make an
5000        asynchronous HTTP request, please define a `callback` function
5001        to be invoked when receiving the response.
5002        >>> def callback_function(response):
5003        >>>     pprint(response)
5004        >>>
5005        >>> thread = api.update_custom_fields(account_id, template_id, callback=callback_function)
5006
5007        :param callback function: The callback function
5008            for asynchronous request. (optional)
5009        :param str account_id: The external account number (int) or account ID Guid. (required)
5010        :param str template_id: The ID of the template being accessed. (required)
5011        :param TemplateCustomFields template_custom_fields:
5012        :return: CustomFields
5013                 If the method is called asynchronously,
5014                 returns the request thread.
5015        """
5016        kwargs['_return_http_data_only'] = True
5017        if kwargs.get('callback'):
5018            return self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
5019        else:
5020            (data) = self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
5021            return data
5022
5023    def update_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
5024        """
5025        Updates envelope custom fields in a template.
5026        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
5027        This method makes a synchronous HTTP request by default. To make an
5028        asynchronous HTTP request, please define a `callback` function
5029        to be invoked when receiving the response.
5030        >>> def callback_function(response):
5031        >>>     pprint(response)
5032        >>>
5033        >>> thread = api.update_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
5034
5035        :param callback function: The callback function
5036            for asynchronous request. (optional)
5037        :param str account_id: The external account number (int) or account ID Guid. (required)
5038        :param str template_id: The ID of the template being accessed. (required)
5039        :param TemplateCustomFields template_custom_fields:
5040        :return: CustomFields
5041                 If the method is called asynchronously,
5042                 returns the request thread.
5043        """
5044
5045        all_params = ['account_id', 'template_id', 'template_custom_fields']
5046        all_params.append('callback')
5047        all_params.append('_return_http_data_only')
5048        all_params.append('_preload_content')
5049        all_params.append('_request_timeout')
5050
5051        params = locals()
5052        for key, val in iteritems(params['kwargs']):
5053            if key not in all_params:
5054                raise TypeError(
5055                    "Got an unexpected keyword argument '%s'"
5056                    " to method update_custom_fields" % key
5057                )
5058            params[key] = val
5059        del params['kwargs']
5060        # verify the required parameter 'account_id' is set
5061        if ('account_id' not in params) or (params['account_id'] is None):
5062            raise ValueError("Missing the required parameter `account_id` when calling `update_custom_fields`")
5063        # verify the required parameter 'template_id' is set
5064        if ('template_id' not in params) or (params['template_id'] is None):
5065            raise ValueError("Missing the required parameter `template_id` when calling `update_custom_fields`")
5066
5067
5068        collection_formats = {}
5069
5070        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
5071        path_params = {}
5072        if 'account_id' in params:
5073            path_params['accountId'] = params['account_id']
5074        if 'template_id' in params:
5075            path_params['templateId'] = params['template_id']
5076
5077        query_params = {}
5078
5079        header_params = {}
5080
5081        form_params = []
5082        local_var_files = {}
5083
5084        body_params = None
5085        if 'template_custom_fields' in params:
5086            body_params = params['template_custom_fields']
5087        # HTTP header `Accept`
5088        header_params['Accept'] = self.api_client.\
5089            select_header_accept(['application/json'])
5090
5091        # Authentication setting
5092        auth_settings = []
5093
5094        return self.api_client.call_api(resource_path, 'PUT',
5095                                        path_params,
5096                                        query_params,
5097                                        header_params,
5098                                        body=body_params,
5099                                        post_params=form_params,
5100                                        files=local_var_files,
5101                                        response_type='CustomFields',
5102                                        auth_settings=auth_settings,
5103                                        callback=params.get('callback'),
5104                                        _return_http_data_only=params.get('_return_http_data_only'),
5105                                        _preload_content=params.get('_preload_content', True),
5106                                        _request_timeout=params.get('_request_timeout'),
5107                                        collection_formats=collection_formats)
5108
5109    def update_document(self, account_id, document_id, template_id, **kwargs):
5110        """
5111        Adds a document to a template document.
5112        Adds the specified document to an existing template document.
5113        This method makes a synchronous HTTP request by default. To make an
5114        asynchronous HTTP request, please define a `callback` function
5115        to be invoked when receiving the response.
5116        >>> def callback_function(response):
5117        >>>     pprint(response)
5118        >>>
5119        >>> thread = api.update_document(account_id, document_id, template_id, callback=callback_function)
5120
5121        :param callback function: The callback function
5122            for asynchronous request. (optional)
5123        :param str account_id: The external account number (int) or account ID Guid. (required)
5124        :param str document_id: The ID of the document being accessed. (required)
5125        :param str template_id: The ID of the template being accessed. (required)
5126        :param str is_envelope_definition:
5127        :param EnvelopeDefinition envelope_definition:
5128        :return: EnvelopeDocument
5129                 If the method is called asynchronously,
5130                 returns the request thread.
5131        """
5132        kwargs['_return_http_data_only'] = True
5133        if kwargs.get('callback'):
5134            return self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
5135        else:
5136            (data) = self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
5137            return data
5138
5139    def update_document_with_http_info(self, account_id, document_id, template_id, **kwargs):
5140        """
5141        Adds a document to a template document.
5142        Adds the specified document to an existing template document.
5143        This method makes a synchronous HTTP request by default. To make an
5144        asynchronous HTTP request, please define a `callback` function
5145        to be invoked when receiving the response.
5146        >>> def callback_function(response):
5147        >>>     pprint(response)
5148        >>>
5149        >>> thread = api.update_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
5150
5151        :param callback function: The callback function
5152            for asynchronous request. (optional)
5153        :param str account_id: The external account number (int) or account ID Guid. (required)
5154        :param str document_id: The ID of the document being accessed. (required)
5155        :param str template_id: The ID of the template being accessed. (required)
5156        :param str is_envelope_definition:
5157        :param EnvelopeDefinition envelope_definition:
5158        :return: EnvelopeDocument
5159                 If the method is called asynchronously,
5160                 returns the request thread.
5161        """
5162
5163        all_params = ['account_id', 'document_id', 'template_id', 'is_envelope_definition', 'envelope_definition']
5164        all_params.append('callback')
5165        all_params.append('_return_http_data_only')
5166        all_params.append('_preload_content')
5167        all_params.append('_request_timeout')
5168
5169        params = locals()
5170        for key, val in iteritems(params['kwargs']):
5171            if key not in all_params:
5172                raise TypeError(
5173                    "Got an unexpected keyword argument '%s'"
5174                    " to method update_document" % key
5175                )
5176            params[key] = val
5177        del params['kwargs']
5178        # verify the required parameter 'account_id' is set
5179        if ('account_id' not in params) or (params['account_id'] is None):
5180            raise ValueError("Missing the required parameter `account_id` when calling `update_document`")
5181        # verify the required parameter 'document_id' is set
5182        if ('document_id' not in params) or (params['document_id'] is None):
5183            raise ValueError("Missing the required parameter `document_id` when calling `update_document`")
5184        # verify the required parameter 'template_id' is set
5185        if ('template_id' not in params) or (params['template_id'] is None):
5186            raise ValueError("Missing the required parameter `template_id` when calling `update_document`")
5187
5188
5189        collection_formats = {}
5190
5191        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
5192        path_params = {}
5193        if 'account_id' in params:
5194            path_params['accountId'] = params['account_id']
5195        if 'document_id' in params:
5196            path_params['documentId'] = params['document_id']
5197        if 'template_id' in params:
5198            path_params['templateId'] = params['template_id']
5199
5200        query_params = {}
5201        if 'is_envelope_definition' in params:
5202            query_params['is_envelope_definition'] = params['is_envelope_definition']
5203
5204        header_params = {}
5205
5206        form_params = []
5207        local_var_files = {}
5208
5209        body_params = None
5210        if 'envelope_definition' in params:
5211            body_params = params['envelope_definition']
5212        # HTTP header `Accept`
5213        header_params['Accept'] = self.api_client.\
5214            select_header_accept(['application/json'])
5215
5216        # Authentication setting
5217        auth_settings = []
5218
5219        return self.api_client.call_api(resource_path, 'PUT',
5220                                        path_params,
5221                                        query_params,
5222                                        header_params,
5223                                        body=body_params,
5224                                        post_params=form_params,
5225                                        files=local_var_files,
5226                                        response_type='EnvelopeDocument',
5227                                        auth_settings=auth_settings,
5228                                        callback=params.get('callback'),
5229                                        _return_http_data_only=params.get('_return_http_data_only'),
5230                                        _preload_content=params.get('_preload_content', True),
5231                                        _request_timeout=params.get('_request_timeout'),
5232                                        collection_formats=collection_formats)
5233
5234    def update_document_fields(self, account_id, document_id, template_id, **kwargs):
5235        """
5236        Updates existing custom document fields in an existing template document.
5237        Updates existing custom document fields in an existing template document.
5238        This method makes a synchronous HTTP request by default. To make an
5239        asynchronous HTTP request, please define a `callback` function
5240        to be invoked when receiving the response.
5241        >>> def callback_function(response):
5242        >>>     pprint(response)
5243        >>>
5244        >>> thread = api.update_document_fields(account_id, document_id, template_id, callback=callback_function)
5245
5246        :param callback function: The callback function
5247            for asynchronous request. (optional)
5248        :param str account_id: The external account number (int) or account ID Guid. (required)
5249        :param str document_id: The ID of the document being accessed. (required)
5250        :param str template_id: The ID of the template being accessed. (required)
5251        :param DocumentFieldsInformation document_fields_information:
5252        :return: DocumentFieldsInformation
5253                 If the method is called asynchronously,
5254                 returns the request thread.
5255        """
5256        kwargs['_return_http_data_only'] = True
5257        if kwargs.get('callback'):
5258            return self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5259        else:
5260            (data) = self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5261            return data
5262
5263    def update_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
5264        """
5265        Updates existing custom document fields in an existing template document.
5266        Updates existing custom document fields in an existing template document.
5267        This method makes a synchronous HTTP request by default. To make an
5268        asynchronous HTTP request, please define a `callback` function
5269        to be invoked when receiving the response.
5270        >>> def callback_function(response):
5271        >>>     pprint(response)
5272        >>>
5273        >>> thread = api.update_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
5274
5275        :param callback function: The callback function
5276            for asynchronous request. (optional)
5277        :param str account_id: The external account number (int) or account ID Guid. (required)
5278        :param str document_id: The ID of the document being accessed. (required)
5279        :param str template_id: The ID of the template being accessed. (required)
5280        :param DocumentFieldsInformation document_fields_information:
5281        :return: DocumentFieldsInformation
5282                 If the method is called asynchronously,
5283                 returns the request thread.
5284        """
5285
5286        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
5287        all_params.append('callback')
5288        all_params.append('_return_http_data_only')
5289        all_params.append('_preload_content')
5290        all_params.append('_request_timeout')
5291
5292        params = locals()
5293        for key, val in iteritems(params['kwargs']):
5294            if key not in all_params:
5295                raise TypeError(
5296                    "Got an unexpected keyword argument '%s'"
5297                    " to method update_document_fields" % key
5298                )
5299            params[key] = val
5300        del params['kwargs']
5301        # verify the required parameter 'account_id' is set
5302        if ('account_id' not in params) or (params['account_id'] is None):
5303            raise ValueError("Missing the required parameter `account_id` when calling `update_document_fields`")
5304        # verify the required parameter 'document_id' is set
5305        if ('document_id' not in params) or (params['document_id'] is None):
5306            raise ValueError("Missing the required parameter `document_id` when calling `update_document_fields`")
5307        # verify the required parameter 'template_id' is set
5308        if ('template_id' not in params) or (params['template_id'] is None):
5309            raise ValueError("Missing the required parameter `template_id` when calling `update_document_fields`")
5310
5311
5312        collection_formats = {}
5313
5314        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
5315        path_params = {}
5316        if 'account_id' in params:
5317            path_params['accountId'] = params['account_id']
5318        if 'document_id' in params:
5319            path_params['documentId'] = params['document_id']
5320        if 'template_id' in params:
5321            path_params['templateId'] = params['template_id']
5322
5323        query_params = {}
5324
5325        header_params = {}
5326
5327        form_params = []
5328        local_var_files = {}
5329
5330        body_params = None
5331        if 'document_fields_information' in params:
5332            body_params = params['document_fields_information']
5333        # HTTP header `Accept`
5334        header_params['Accept'] = self.api_client.\
5335            select_header_accept(['application/json'])
5336
5337        # Authentication setting
5338        auth_settings = []
5339
5340        return self.api_client.call_api(resource_path, 'PUT',
5341                                        path_params,
5342                                        query_params,
5343                                        header_params,
5344                                        body=body_params,
5345                                        post_params=form_params,
5346                                        files=local_var_files,
5347                                        response_type='DocumentFieldsInformation',
5348                                        auth_settings=auth_settings,
5349                                        callback=params.get('callback'),
5350                                        _return_http_data_only=params.get('_return_http_data_only'),
5351                                        _preload_content=params.get('_preload_content', True),
5352                                        _request_timeout=params.get('_request_timeout'),
5353                                        collection_formats=collection_formats)
5354
5355    def update_documents(self, account_id, template_id, **kwargs):
5356        """
5357        Adds documents to a template document.
5358        Adds one or more documents to an existing template document.
5359        This method makes a synchronous HTTP request by default. To make an
5360        asynchronous HTTP request, please define a `callback` function
5361        to be invoked when receiving the response.
5362        >>> def callback_function(response):
5363        >>>     pprint(response)
5364        >>>
5365        >>> thread = api.update_documents(account_id, template_id, callback=callback_function)
5366
5367        :param callback function: The callback function
5368            for asynchronous request. (optional)
5369        :param str account_id: The external account number (int) or account ID Guid. (required)
5370        :param str template_id: The ID of the template being accessed. (required)
5371        :param EnvelopeDefinition envelope_definition:
5372        :return: TemplateDocumentsResult
5373                 If the method is called asynchronously,
5374                 returns the request thread.
5375        """
5376        kwargs['_return_http_data_only'] = True
5377        if kwargs.get('callback'):
5378            return self.update_documents_with_http_info(account_id, template_id, **kwargs)
5379        else:
5380            (data) = self.update_documents_with_http_info(account_id, template_id, **kwargs)
5381            return data
5382
5383    def update_documents_with_http_info(self, account_id, template_id, **kwargs):
5384        """
5385        Adds documents to a template document.
5386        Adds one or more documents to an existing template document.
5387        This method makes a synchronous HTTP request by default. To make an
5388        asynchronous HTTP request, please define a `callback` function
5389        to be invoked when receiving the response.
5390        >>> def callback_function(response):
5391        >>>     pprint(response)
5392        >>>
5393        >>> thread = api.update_documents_with_http_info(account_id, template_id, callback=callback_function)
5394
5395        :param callback function: The callback function
5396            for asynchronous request. (optional)
5397        :param str account_id: The external account number (int) or account ID Guid. (required)
5398        :param str template_id: The ID of the template being accessed. (required)
5399        :param EnvelopeDefinition envelope_definition:
5400        :return: TemplateDocumentsResult
5401                 If the method is called asynchronously,
5402                 returns the request thread.
5403        """
5404
5405        all_params = ['account_id', 'template_id', 'envelope_definition']
5406        all_params.append('callback')
5407        all_params.append('_return_http_data_only')
5408        all_params.append('_preload_content')
5409        all_params.append('_request_timeout')
5410
5411        params = locals()
5412        for key, val in iteritems(params['kwargs']):
5413            if key not in all_params:
5414                raise TypeError(
5415                    "Got an unexpected keyword argument '%s'"
5416                    " to method update_documents" % key
5417                )
5418            params[key] = val
5419        del params['kwargs']
5420        # verify the required parameter 'account_id' is set
5421        if ('account_id' not in params) or (params['account_id'] is None):
5422            raise ValueError("Missing the required parameter `account_id` when calling `update_documents`")
5423        # verify the required parameter 'template_id' is set
5424        if ('template_id' not in params) or (params['template_id'] is None):
5425            raise ValueError("Missing the required parameter `template_id` when calling `update_documents`")
5426
5427
5428        collection_formats = {}
5429
5430        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
5431        path_params = {}
5432        if 'account_id' in params:
5433            path_params['accountId'] = params['account_id']
5434        if 'template_id' in params:
5435            path_params['templateId'] = params['template_id']
5436
5437        query_params = {}
5438
5439        header_params = {}
5440
5441        form_params = []
5442        local_var_files = {}
5443
5444        body_params = None
5445        if 'envelope_definition' in params:
5446            body_params = params['envelope_definition']
5447        # HTTP header `Accept`
5448        header_params['Accept'] = self.api_client.\
5449            select_header_accept(['application/json'])
5450
5451        # Authentication setting
5452        auth_settings = []
5453
5454        return self.api_client.call_api(resource_path, 'PUT',
5455                                        path_params,
5456                                        query_params,
5457                                        header_params,
5458                                        body=body_params,
5459                                        post_params=form_params,
5460                                        files=local_var_files,
5461                                        response_type='TemplateDocumentsResult',
5462                                        auth_settings=auth_settings,
5463                                        callback=params.get('callback'),
5464                                        _return_http_data_only=params.get('_return_http_data_only'),
5465                                        _preload_content=params.get('_preload_content', True),
5466                                        _request_timeout=params.get('_request_timeout'),
5467                                        collection_formats=collection_formats)
5468
5469    def update_group_share(self, account_id, template_id, template_part, **kwargs):
5470        """
5471        Shares a template with a group
5472        Shares a template with the specified members group.
5473        This method makes a synchronous HTTP request by default. To make an
5474        asynchronous HTTP request, please define a `callback` function
5475        to be invoked when receiving the response.
5476        >>> def callback_function(response):
5477        >>>     pprint(response)
5478        >>>
5479        >>> thread = api.update_group_share(account_id, template_id, template_part, callback=callback_function)
5480
5481        :param callback function: The callback function
5482            for asynchronous request. (optional)
5483        :param str account_id: The external account number (int) or account ID Guid. (required)
5484        :param str template_id: The ID of the template being accessed. (required)
5485        :param str template_part: Currently, the only defined part is **groups**. (required)
5486        :param GroupInformation group_information:
5487        :return: GroupInformation
5488                 If the method is called asynchronously,
5489                 returns the request thread.
5490        """
5491        kwargs['_return_http_data_only'] = True
5492        if kwargs.get('callback'):
5493            return self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5494        else:
5495            (data) = self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5496            return data
5497
5498    def update_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs):
5499        """
5500        Shares a template with a group
5501        Shares a template with the specified members group.
5502        This method makes a synchronous HTTP request by default. To make an
5503        asynchronous HTTP request, please define a `callback` function
5504        to be invoked when receiving the response.
5505        >>> def callback_function(response):
5506        >>>     pprint(response)
5507        >>>
5508        >>> thread = api.update_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
5509
5510        :param callback function: The callback function
5511            for asynchronous request. (optional)
5512        :param str account_id: The external account number (int) or account ID Guid. (required)
5513        :param str template_id: The ID of the template being accessed. (required)
5514        :param str template_part: Currently, the only defined part is **groups**. (required)
5515        :param GroupInformation group_information:
5516        :return: GroupInformation
5517                 If the method is called asynchronously,
5518                 returns the request thread.
5519        """
5520
5521        all_params = ['account_id', 'template_id', 'template_part', 'group_information']
5522        all_params.append('callback')
5523        all_params.append('_return_http_data_only')
5524        all_params.append('_preload_content')
5525        all_params.append('_request_timeout')
5526
5527        params = locals()
5528        for key, val in iteritems(params['kwargs']):
5529            if key not in all_params:
5530                raise TypeError(
5531                    "Got an unexpected keyword argument '%s'"
5532                    " to method update_group_share" % key
5533                )
5534            params[key] = val
5535        del params['kwargs']
5536        # verify the required parameter 'account_id' is set
5537        if ('account_id' not in params) or (params['account_id'] is None):
5538            raise ValueError("Missing the required parameter `account_id` when calling `update_group_share`")
5539        # verify the required parameter 'template_id' is set
5540        if ('template_id' not in params) or (params['template_id'] is None):
5541            raise ValueError("Missing the required parameter `template_id` when calling `update_group_share`")
5542        # verify the required parameter 'template_part' is set
5543        if ('template_part' not in params) or (params['template_part'] is None):
5544            raise ValueError("Missing the required parameter `template_part` when calling `update_group_share`")
5545
5546
5547        collection_formats = {}
5548
5549        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json')
5550        path_params = {}
5551        if 'account_id' in params:
5552            path_params['accountId'] = params['account_id']
5553        if 'template_id' in params:
5554            path_params['templateId'] = params['template_id']
5555        if 'template_part' in params:
5556            path_params['templatePart'] = params['template_part']
5557
5558        query_params = {}
5559
5560        header_params = {}
5561
5562        form_params = []
5563        local_var_files = {}
5564
5565        body_params = None
5566        if 'group_information' in params:
5567            body_params = params['group_information']
5568        # HTTP header `Accept`
5569        header_params['Accept'] = self.api_client.\
5570            select_header_accept(['application/json'])
5571
5572        # Authentication setting
5573        auth_settings = []
5574
5575        return self.api_client.call_api(resource_path, 'PUT',
5576                                        path_params,
5577                                        query_params,
5578                                        header_params,
5579                                        body=body_params,
5580                                        post_params=form_params,
5581                                        files=local_var_files,
5582                                        response_type='GroupInformation',
5583                                        auth_settings=auth_settings,
5584                                        callback=params.get('callback'),
5585                                        _return_http_data_only=params.get('_return_http_data_only'),
5586                                        _preload_content=params.get('_preload_content', True),
5587                                        _request_timeout=params.get('_request_timeout'),
5588                                        collection_formats=collection_formats)
5589
5590    def update_lock(self, account_id, template_id, **kwargs):
5591        """
5592        Updates a template lock.
5593        Updates the lock duration time or update the `lockedByApp` property information for the specified template. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated.
5594        This method makes a synchronous HTTP request by default. To make an
5595        asynchronous HTTP request, please define a `callback` function
5596        to be invoked when receiving the response.
5597        >>> def callback_function(response):
5598        >>>     pprint(response)
5599        >>>
5600        >>> thread = api.update_lock(account_id, template_id, callback=callback_function)
5601
5602        :param callback function: The callback function
5603            for asynchronous request. (optional)
5604        :param str account_id: The external account number (int) or account ID Guid. (required)
5605        :param str template_id: The ID of the template being accessed. (required)
5606        :param LockRequest lock_request:
5607        :return: LockInformation
5608                 If the method is called asynchronously,
5609                 returns the request thread.
5610        """
5611        kwargs['_return_http_data_only'] = True
5612        if kwargs.get('callback'):
5613            return self.update_lock_with_http_info(account_id, template_id, **kwargs)
5614        else:
5615            (data) = self.update_lock_with_http_info(account_id, template_id, **kwargs)
5616            return data
5617
5618    def update_lock_with_http_info(self, account_id, template_id, **kwargs):
5619        """
5620        Updates a template lock.
5621        Updates the lock duration time or update the `lockedByApp` property information for the specified template. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated.
5622        This method makes a synchronous HTTP request by default. To make an
5623        asynchronous HTTP request, please define a `callback` function
5624        to be invoked when receiving the response.
5625        >>> def callback_function(response):
5626        >>>     pprint(response)
5627        >>>
5628        >>> thread = api.update_lock_with_http_info(account_id, template_id, callback=callback_function)
5629
5630        :param callback function: The callback function
5631            for asynchronous request. (optional)
5632        :param str account_id: The external account number (int) or account ID Guid. (required)
5633        :param str template_id: The ID of the template being accessed. (required)
5634        :param LockRequest lock_request:
5635        :return: LockInformation
5636                 If the method is called asynchronously,
5637                 returns the request thread.
5638        """
5639
5640        all_params = ['account_id', 'template_id', 'lock_request']
5641        all_params.append('callback')
5642        all_params.append('_return_http_data_only')
5643        all_params.append('_preload_content')
5644        all_params.append('_request_timeout')
5645
5646        params = locals()
5647        for key, val in iteritems(params['kwargs']):
5648            if key not in all_params:
5649                raise TypeError(
5650                    "Got an unexpected keyword argument '%s'"
5651                    " to method update_lock" % key
5652                )
5653            params[key] = val
5654        del params['kwargs']
5655        # verify the required parameter 'account_id' is set
5656        if ('account_id' not in params) or (params['account_id'] is None):
5657            raise ValueError("Missing the required parameter `account_id` when calling `update_lock`")
5658        # verify the required parameter 'template_id' is set
5659        if ('template_id' not in params) or (params['template_id'] is None):
5660            raise ValueError("Missing the required parameter `template_id` when calling `update_lock`")
5661
5662
5663        collection_formats = {}
5664
5665        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
5666        path_params = {}
5667        if 'account_id' in params:
5668            path_params['accountId'] = params['account_id']
5669        if 'template_id' in params:
5670            path_params['templateId'] = params['template_id']
5671
5672        query_params = {}
5673
5674        header_params = {}
5675
5676        form_params = []
5677        local_var_files = {}
5678
5679        body_params = None
5680        if 'lock_request' in params:
5681            body_params = params['lock_request']
5682        # HTTP header `Accept`
5683        header_params['Accept'] = self.api_client.\
5684            select_header_accept(['application/json'])
5685
5686        # Authentication setting
5687        auth_settings = []
5688
5689        return self.api_client.call_api(resource_path, 'PUT',
5690                                        path_params,
5691                                        query_params,
5692                                        header_params,
5693                                        body=body_params,
5694                                        post_params=form_params,
5695                                        files=local_var_files,
5696                                        response_type='LockInformation',
5697                                        auth_settings=auth_settings,
5698                                        callback=params.get('callback'),
5699                                        _return_http_data_only=params.get('_return_http_data_only'),
5700                                        _preload_content=params.get('_preload_content', True),
5701                                        _request_timeout=params.get('_request_timeout'),
5702                                        collection_formats=collection_formats)
5703
5704    def update_notification_settings(self, account_id, template_id, **kwargs):
5705        """
5706        Updates the notification  structure for an existing template.
5707        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5708        This method makes a synchronous HTTP request by default. To make an
5709        asynchronous HTTP request, please define a `callback` function
5710        to be invoked when receiving the response.
5711        >>> def callback_function(response):
5712        >>>     pprint(response)
5713        >>>
5714        >>> thread = api.update_notification_settings(account_id, template_id, callback=callback_function)
5715
5716        :param callback function: The callback function
5717            for asynchronous request. (optional)
5718        :param str account_id: The external account number (int) or account ID Guid. (required)
5719        :param str template_id: The ID of the template being accessed. (required)
5720        :param TemplateNotificationRequest template_notification_request:
5721        :return: Notification
5722                 If the method is called asynchronously,
5723                 returns the request thread.
5724        """
5725        kwargs['_return_http_data_only'] = True
5726        if kwargs.get('callback'):
5727            return self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5728        else:
5729            (data) = self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5730            return data
5731
5732    def update_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
5733        """
5734        Updates the notification  structure for an existing template.
5735        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5736        This method makes a synchronous HTTP request by default. To make an
5737        asynchronous HTTP request, please define a `callback` function
5738        to be invoked when receiving the response.
5739        >>> def callback_function(response):
5740        >>>     pprint(response)
5741        >>>
5742        >>> thread = api.update_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
5743
5744        :param callback function: The callback function
5745            for asynchronous request. (optional)
5746        :param str account_id: The external account number (int) or account ID Guid. (required)
5747        :param str template_id: The ID of the template being accessed. (required)
5748        :param TemplateNotificationRequest template_notification_request:
5749        :return: Notification
5750                 If the method is called asynchronously,
5751                 returns the request thread.
5752        """
5753
5754        all_params = ['account_id', 'template_id', 'template_notification_request']
5755        all_params.append('callback')
5756        all_params.append('_return_http_data_only')
5757        all_params.append('_preload_content')
5758        all_params.append('_request_timeout')
5759
5760        params = locals()
5761        for key, val in iteritems(params['kwargs']):
5762            if key not in all_params:
5763                raise TypeError(
5764                    "Got an unexpected keyword argument '%s'"
5765                    " to method update_notification_settings" % key
5766                )
5767            params[key] = val
5768        del params['kwargs']
5769        # verify the required parameter 'account_id' is set
5770        if ('account_id' not in params) or (params['account_id'] is None):
5771            raise ValueError("Missing the required parameter `account_id` when calling `update_notification_settings`")
5772        # verify the required parameter 'template_id' is set
5773        if ('template_id' not in params) or (params['template_id'] is None):
5774            raise ValueError("Missing the required parameter `template_id` when calling `update_notification_settings`")
5775
5776
5777        collection_formats = {}
5778
5779        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
5780        path_params = {}
5781        if 'account_id' in params:
5782            path_params['accountId'] = params['account_id']
5783        if 'template_id' in params:
5784            path_params['templateId'] = params['template_id']
5785
5786        query_params = {}
5787
5788        header_params = {}
5789
5790        form_params = []
5791        local_var_files = {}
5792
5793        body_params = None
5794        if 'template_notification_request' in params:
5795            body_params = params['template_notification_request']
5796        # HTTP header `Accept`
5797        header_params['Accept'] = self.api_client.\
5798            select_header_accept(['application/json'])
5799
5800        # Authentication setting
5801        auth_settings = []
5802
5803        return self.api_client.call_api(resource_path, 'PUT',
5804                                        path_params,
5805                                        query_params,
5806                                        header_params,
5807                                        body=body_params,
5808                                        post_params=form_params,
5809                                        files=local_var_files,
5810                                        response_type='Notification',
5811                                        auth_settings=auth_settings,
5812                                        callback=params.get('callback'),
5813                                        _return_http_data_only=params.get('_return_http_data_only'),
5814                                        _preload_content=params.get('_preload_content', True),
5815                                        _request_timeout=params.get('_request_timeout'),
5816                                        collection_formats=collection_formats)
5817
5818    def update_recipients(self, account_id, template_id, **kwargs):
5819        """
5820        Updates recipients in a template.
5821        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5822        This method makes a synchronous HTTP request by default. To make an
5823        asynchronous HTTP request, please define a `callback` function
5824        to be invoked when receiving the response.
5825        >>> def callback_function(response):
5826        >>>     pprint(response)
5827        >>>
5828        >>> thread = api.update_recipients(account_id, template_id, callback=callback_function)
5829
5830        :param callback function: The callback function
5831            for asynchronous request. (optional)
5832        :param str account_id: The external account number (int) or account ID Guid. (required)
5833        :param str template_id: The ID of the template being accessed. (required)
5834        :param str resend_envelope:
5835        :param TemplateRecipients template_recipients:
5836        :return: RecipientsUpdateSummary
5837                 If the method is called asynchronously,
5838                 returns the request thread.
5839        """
5840        kwargs['_return_http_data_only'] = True
5841        if kwargs.get('callback'):
5842            return self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5843        else:
5844            (data) = self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5845            return data
5846
5847    def update_recipients_with_http_info(self, account_id, template_id, **kwargs):
5848        """
5849        Updates recipients in a template.
5850        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5851        This method makes a synchronous HTTP request by default. To make an
5852        asynchronous HTTP request, please define a `callback` function
5853        to be invoked when receiving the response.
5854        >>> def callback_function(response):
5855        >>>     pprint(response)
5856        >>>
5857        >>> thread = api.update_recipients_with_http_info(account_id, template_id, callback=callback_function)
5858
5859        :param callback function: The callback function
5860            for asynchronous request. (optional)
5861        :param str account_id: The external account number (int) or account ID Guid. (required)
5862        :param str template_id: The ID of the template being accessed. (required)
5863        :param str resend_envelope:
5864        :param TemplateRecipients template_recipients:
5865        :return: RecipientsUpdateSummary
5866                 If the method is called asynchronously,
5867                 returns the request thread.
5868        """
5869
5870        all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients']
5871        all_params.append('callback')
5872        all_params.append('_return_http_data_only')
5873        all_params.append('_preload_content')
5874        all_params.append('_request_timeout')
5875
5876        params = locals()
5877        for key, val in iteritems(params['kwargs']):
5878            if key not in all_params:
5879                raise TypeError(
5880                    "Got an unexpected keyword argument '%s'"
5881                    " to method update_recipients" % key
5882                )
5883            params[key] = val
5884        del params['kwargs']
5885        # verify the required parameter 'account_id' is set
5886        if ('account_id' not in params) or (params['account_id'] is None):
5887            raise ValueError("Missing the required parameter `account_id` when calling `update_recipients`")
5888        # verify the required parameter 'template_id' is set
5889        if ('template_id' not in params) or (params['template_id'] is None):
5890            raise ValueError("Missing the required parameter `template_id` when calling `update_recipients`")
5891
5892
5893        collection_formats = {}
5894
5895        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
5896        path_params = {}
5897        if 'account_id' in params:
5898            path_params['accountId'] = params['account_id']
5899        if 'template_id' in params:
5900            path_params['templateId'] = params['template_id']
5901
5902        query_params = {}
5903        if 'resend_envelope' in params:
5904            query_params['resend_envelope'] = params['resend_envelope']
5905
5906        header_params = {}
5907
5908        form_params = []
5909        local_var_files = {}
5910
5911        body_params = None
5912        if 'template_recipients' in params:
5913            body_params = params['template_recipients']
5914        # HTTP header `Accept`
5915        header_params['Accept'] = self.api_client.\
5916            select_header_accept(['application/json'])
5917
5918        # Authentication setting
5919        auth_settings = []
5920
5921        return self.api_client.call_api(resource_path, 'PUT',
5922                                        path_params,
5923                                        query_params,
5924                                        header_params,
5925                                        body=body_params,
5926                                        post_params=form_params,
5927                                        files=local_var_files,
5928                                        response_type='RecipientsUpdateSummary',
5929                                        auth_settings=auth_settings,
5930                                        callback=params.get('callback'),
5931                                        _return_http_data_only=params.get('_return_http_data_only'),
5932                                        _preload_content=params.get('_preload_content', True),
5933                                        _request_timeout=params.get('_request_timeout'),
5934                                        collection_formats=collection_formats)
5935
5936    def update_tabs(self, account_id, recipient_id, template_id, **kwargs):
5937        """
5938        Updates the tabs for a recipient.
5939        Updates one or more tabs for a recipient in a template.
5940        This method makes a synchronous HTTP request by default. To make an
5941        asynchronous HTTP request, please define a `callback` function
5942        to be invoked when receiving the response.
5943        >>> def callback_function(response):
5944        >>>     pprint(response)
5945        >>>
5946        >>> thread = api.update_tabs(account_id, recipient_id, template_id, callback=callback_function)
5947
5948        :param callback function: The callback function
5949            for asynchronous request. (optional)
5950        :param str account_id: The external account number (int) or account ID Guid. (required)
5951        :param str recipient_id: The ID of the recipient being accessed. (required)
5952        :param str template_id: The ID of the template being accessed. (required)
5953        :param TemplateTabs template_tabs:
5954        :return: Tabs
5955                 If the method is called asynchronously,
5956                 returns the request thread.
5957        """
5958        kwargs['_return_http_data_only'] = True
5959        if kwargs.get('callback'):
5960            return self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5961        else:
5962            (data) = self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5963            return data
5964
5965    def update_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
5966        """
5967        Updates the tabs for a recipient.
5968        Updates one or more tabs for a recipient in a template.
5969        This method makes a synchronous HTTP request by default. To make an
5970        asynchronous HTTP request, please define a `callback` function
5971        to be invoked when receiving the response.
5972        >>> def callback_function(response):
5973        >>>     pprint(response)
5974        >>>
5975        >>> thread = api.update_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
5976
5977        :param callback function: The callback function
5978            for asynchronous request. (optional)
5979        :param str account_id: The external account number (int) or account ID Guid. (required)
5980        :param str recipient_id: The ID of the recipient being accessed. (required)
5981        :param str template_id: The ID of the template being accessed. (required)
5982        :param TemplateTabs template_tabs:
5983        :return: Tabs
5984                 If the method is called asynchronously,
5985                 returns the request thread.
5986        """
5987
5988        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
5989        all_params.append('callback')
5990        all_params.append('_return_http_data_only')
5991        all_params.append('_preload_content')
5992        all_params.append('_request_timeout')
5993
5994        params = locals()
5995        for key, val in iteritems(params['kwargs']):
5996            if key not in all_params:
5997                raise TypeError(
5998                    "Got an unexpected keyword argument '%s'"
5999                    " to method update_tabs" % key
6000                )
6001            params[key] = val
6002        del params['kwargs']
6003        # verify the required parameter 'account_id' is set
6004        if ('account_id' not in params) or (params['account_id'] is None):
6005            raise ValueError("Missing the required parameter `account_id` when calling `update_tabs`")
6006        # verify the required parameter 'recipient_id' is set
6007        if ('recipient_id' not in params) or (params['recipient_id'] is None):
6008            raise ValueError("Missing the required parameter `recipient_id` when calling `update_tabs`")
6009        # verify the required parameter 'template_id' is set
6010        if ('template_id' not in params) or (params['template_id'] is None):
6011            raise ValueError("Missing the required parameter `template_id` when calling `update_tabs`")
6012
6013
6014        collection_formats = {}
6015
6016        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
6017        path_params = {}
6018        if 'account_id' in params:
6019            path_params['accountId'] = params['account_id']
6020        if 'recipient_id' in params:
6021            path_params['recipientId'] = params['recipient_id']
6022        if 'template_id' in params:
6023            path_params['templateId'] = params['template_id']
6024
6025        query_params = {}
6026
6027        header_params = {}
6028
6029        form_params = []
6030        local_var_files = {}
6031
6032        body_params = None
6033        if 'template_tabs' in params:
6034            body_params = params['template_tabs']
6035        # HTTP header `Accept`
6036        header_params['Accept'] = self.api_client.\
6037            select_header_accept(['application/json'])
6038
6039        # Authentication setting
6040        auth_settings = []
6041
6042        return self.api_client.call_api(resource_path, 'PUT',
6043                                        path_params,
6044                                        query_params,
6045                                        header_params,
6046                                        body=body_params,
6047                                        post_params=form_params,
6048                                        files=local_var_files,
6049                                        response_type='Tabs',
6050                                        auth_settings=auth_settings,
6051                                        callback=params.get('callback'),
6052                                        _return_http_data_only=params.get('_return_http_data_only'),
6053                                        _preload_content=params.get('_preload_content', True),
6054                                        _request_timeout=params.get('_request_timeout'),
6055                                        collection_formats=collection_formats)
6056
6057    def update_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
6058        """
6059        Updates the tabs for a template
6060        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
6061        This method makes a synchronous HTTP request by default. To make an
6062        asynchronous HTTP request, please define a `callback` function
6063        to be invoked when receiving the response.
6064        >>> def callback_function(response):
6065        >>>     pprint(response)
6066        >>>
6067        >>> thread = api.update_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
6068
6069        :param callback function: The callback function
6070            for asynchronous request. (optional)
6071        :param str account_id: The external account number (int) or account ID Guid. (required)
6072        :param str document_id: The ID of the document being accessed. (required)
6073        :param str template_id: The ID of the template being accessed. (required)
6074        :param TemplateTabs template_tabs:
6075        :return: Tabs
6076                 If the method is called asynchronously,
6077                 returns the request thread.
6078        """
6079        kwargs['_return_http_data_only'] = True
6080        if kwargs.get('callback'):
6081            return self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
6082        else:
6083            (data) = self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
6084            return data
6085
6086    def update_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
6087        """
6088        Updates the tabs for a template
6089        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
6090        This method makes a synchronous HTTP request by default. To make an
6091        asynchronous HTTP request, please define a `callback` function
6092        to be invoked when receiving the response.
6093        >>> def callback_function(response):
6094        >>>     pprint(response)
6095        >>>
6096        >>> thread = api.update_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
6097
6098        :param callback function: The callback function
6099            for asynchronous request. (optional)
6100        :param str account_id: The external account number (int) or account ID Guid. (required)
6101        :param str document_id: The ID of the document being accessed. (required)
6102        :param str template_id: The ID of the template being accessed. (required)
6103        :param TemplateTabs template_tabs:
6104        :return: Tabs
6105                 If the method is called asynchronously,
6106                 returns the request thread.
6107        """
6108
6109        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
6110        all_params.append('callback')
6111        all_params.append('_return_http_data_only')
6112        all_params.append('_preload_content')
6113        all_params.append('_request_timeout')
6114
6115        params = locals()
6116        for key, val in iteritems(params['kwargs']):
6117            if key not in all_params:
6118                raise TypeError(
6119                    "Got an unexpected keyword argument '%s'"
6120                    " to method update_template_document_tabs" % key
6121                )
6122            params[key] = val
6123        del params['kwargs']
6124        # verify the required parameter 'account_id' is set
6125        if ('account_id' not in params) or (params['account_id'] is None):
6126            raise ValueError("Missing the required parameter `account_id` when calling `update_template_document_tabs`")
6127        # verify the required parameter 'document_id' is set
6128        if ('document_id' not in params) or (params['document_id'] is None):
6129            raise ValueError("Missing the required parameter `document_id` when calling `update_template_document_tabs`")
6130        # verify the required parameter 'template_id' is set
6131        if ('template_id' not in params) or (params['template_id'] is None):
6132            raise ValueError("Missing the required parameter `template_id` when calling `update_template_document_tabs`")
6133
6134
6135        collection_formats = {}
6136
6137        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
6138        path_params = {}
6139        if 'account_id' in params:
6140            path_params['accountId'] = params['account_id']
6141        if 'document_id' in params:
6142            path_params['documentId'] = params['document_id']
6143        if 'template_id' in params:
6144            path_params['templateId'] = params['template_id']
6145
6146        query_params = {}
6147
6148        header_params = {}
6149
6150        form_params = []
6151        local_var_files = {}
6152
6153        body_params = None
6154        if 'template_tabs' in params:
6155            body_params = params['template_tabs']
6156        # HTTP header `Accept`
6157        header_params['Accept'] = self.api_client.\
6158            select_header_accept(['application/json'])
6159
6160        # Authentication setting
6161        auth_settings = []
6162
6163        return self.api_client.call_api(resource_path, 'PUT',
6164                                        path_params,
6165                                        query_params,
6166                                        header_params,
6167                                        body=body_params,
6168                                        post_params=form_params,
6169                                        files=local_var_files,
6170                                        response_type='Tabs',
6171                                        auth_settings=auth_settings,
6172                                        callback=params.get('callback'),
6173                                        _return_http_data_only=params.get('_return_http_data_only'),
6174                                        _preload_content=params.get('_preload_content', True),
6175                                        _request_timeout=params.get('_request_timeout'),
6176                                        collection_formats=collection_formats)

NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen

TemplatesApi(api_client=None)
35    def __init__(self, api_client=None):
36        config = Configuration()
37        if api_client:
38            self.api_client = api_client
39        else:
40            if not config.api_client:
41                config.api_client = ApiClient()
42            self.api_client = config.api_client
def create_custom_fields(self, account_id, template_id, **kwargs)
44    def create_custom_fields(self, account_id, template_id, **kwargs):
45        """
46        Creates custom document fields in an existing template document.
47        Creates custom document fields in an existing template document.
48        This method makes a synchronous HTTP request by default. To make an
49        asynchronous HTTP request, please define a `callback` function
50        to be invoked when receiving the response.
51        >>> def callback_function(response):
52        >>>     pprint(response)
53        >>>
54        >>> thread = api.create_custom_fields(account_id, template_id, callback=callback_function)
55
56        :param callback function: The callback function
57            for asynchronous request. (optional)
58        :param str account_id: The external account number (int) or account ID Guid. (required)
59        :param str template_id: The ID of the template being accessed. (required)
60        :param TemplateCustomFields template_custom_fields:
61        :return: CustomFields
62                 If the method is called asynchronously,
63                 returns the request thread.
64        """
65        kwargs['_return_http_data_only'] = True
66        if kwargs.get('callback'):
67            return self.create_custom_fields_with_http_info(account_id, template_id, **kwargs)
68        else:
69            (data) = self.create_custom_fields_with_http_info(account_id, template_id, **kwargs)
70            return data

Creates custom document fields in an existing template document. Creates custom document fields in an existing template document. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_custom_fields(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateCustomFields template_custom_fields:
Returns

CustomFields If the method is called asynchronously, returns the request thread.

def create_custom_fields_with_http_info(self, account_id, template_id, **kwargs)
 72    def create_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
 73        """
 74        Creates custom document fields in an existing template document.
 75        Creates custom document fields in an existing template document.
 76        This method makes a synchronous HTTP request by default. To make an
 77        asynchronous HTTP request, please define a `callback` function
 78        to be invoked when receiving the response.
 79        >>> def callback_function(response):
 80        >>>     pprint(response)
 81        >>>
 82        >>> thread = api.create_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
 83
 84        :param callback function: The callback function
 85            for asynchronous request. (optional)
 86        :param str account_id: The external account number (int) or account ID Guid. (required)
 87        :param str template_id: The ID of the template being accessed. (required)
 88        :param TemplateCustomFields template_custom_fields:
 89        :return: CustomFields
 90                 If the method is called asynchronously,
 91                 returns the request thread.
 92        """
 93
 94        all_params = ['account_id', 'template_id', 'template_custom_fields']
 95        all_params.append('callback')
 96        all_params.append('_return_http_data_only')
 97        all_params.append('_preload_content')
 98        all_params.append('_request_timeout')
 99
100        params = locals()
101        for key, val in iteritems(params['kwargs']):
102            if key not in all_params:
103                raise TypeError(
104                    "Got an unexpected keyword argument '%s'"
105                    " to method create_custom_fields" % key
106                )
107            params[key] = val
108        del params['kwargs']
109        # verify the required parameter 'account_id' is set
110        if ('account_id' not in params) or (params['account_id'] is None):
111            raise ValueError("Missing the required parameter `account_id` when calling `create_custom_fields`")
112        # verify the required parameter 'template_id' is set
113        if ('template_id' not in params) or (params['template_id'] is None):
114            raise ValueError("Missing the required parameter `template_id` when calling `create_custom_fields`")
115
116
117        collection_formats = {}
118
119        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
120        path_params = {}
121        if 'account_id' in params:
122            path_params['accountId'] = params['account_id']
123        if 'template_id' in params:
124            path_params['templateId'] = params['template_id']
125
126        query_params = {}
127
128        header_params = {}
129
130        form_params = []
131        local_var_files = {}
132
133        body_params = None
134        if 'template_custom_fields' in params:
135            body_params = params['template_custom_fields']
136        # HTTP header `Accept`
137        header_params['Accept'] = self.api_client.\
138            select_header_accept(['application/json'])
139
140        # Authentication setting
141        auth_settings = []
142
143        return self.api_client.call_api(resource_path, 'POST',
144                                        path_params,
145                                        query_params,
146                                        header_params,
147                                        body=body_params,
148                                        post_params=form_params,
149                                        files=local_var_files,
150                                        response_type='CustomFields',
151                                        auth_settings=auth_settings,
152                                        callback=params.get('callback'),
153                                        _return_http_data_only=params.get('_return_http_data_only'),
154                                        _preload_content=params.get('_preload_content', True),
155                                        _request_timeout=params.get('_request_timeout'),
156                                        collection_formats=collection_formats)

Creates custom document fields in an existing template document. Creates custom document fields in an existing template document. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateCustomFields template_custom_fields:
Returns

CustomFields If the method is called asynchronously, returns the request thread.

def create_document_fields(self, account_id, document_id, template_id, **kwargs)
158    def create_document_fields(self, account_id, document_id, template_id, **kwargs):
159        """
160        Creates custom document fields in an existing template document.
161        Creates custom document fields in an existing template document.
162        This method makes a synchronous HTTP request by default. To make an
163        asynchronous HTTP request, please define a `callback` function
164        to be invoked when receiving the response.
165        >>> def callback_function(response):
166        >>>     pprint(response)
167        >>>
168        >>> thread = api.create_document_fields(account_id, document_id, template_id, callback=callback_function)
169
170        :param callback function: The callback function
171            for asynchronous request. (optional)
172        :param str account_id: The external account number (int) or account ID Guid. (required)
173        :param str document_id: The ID of the document being accessed. (required)
174        :param str template_id: The ID of the template being accessed. (required)
175        :param DocumentFieldsInformation document_fields_information:
176        :return: DocumentFieldsInformation
177                 If the method is called asynchronously,
178                 returns the request thread.
179        """
180        kwargs['_return_http_data_only'] = True
181        if kwargs.get('callback'):
182            return self.create_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
183        else:
184            (data) = self.create_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
185            return data

Creates custom document fields in an existing template document. Creates custom document fields in an existing template document. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_document_fields(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentFieldsInformation document_fields_information:
Returns

DocumentFieldsInformation If the method is called asynchronously, returns the request thread.

def create_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs)
187    def create_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
188        """
189        Creates custom document fields in an existing template document.
190        Creates custom document fields in an existing template document.
191        This method makes a synchronous HTTP request by default. To make an
192        asynchronous HTTP request, please define a `callback` function
193        to be invoked when receiving the response.
194        >>> def callback_function(response):
195        >>>     pprint(response)
196        >>>
197        >>> thread = api.create_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
198
199        :param callback function: The callback function
200            for asynchronous request. (optional)
201        :param str account_id: The external account number (int) or account ID Guid. (required)
202        :param str document_id: The ID of the document being accessed. (required)
203        :param str template_id: The ID of the template being accessed. (required)
204        :param DocumentFieldsInformation document_fields_information:
205        :return: DocumentFieldsInformation
206                 If the method is called asynchronously,
207                 returns the request thread.
208        """
209
210        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
211        all_params.append('callback')
212        all_params.append('_return_http_data_only')
213        all_params.append('_preload_content')
214        all_params.append('_request_timeout')
215
216        params = locals()
217        for key, val in iteritems(params['kwargs']):
218            if key not in all_params:
219                raise TypeError(
220                    "Got an unexpected keyword argument '%s'"
221                    " to method create_document_fields" % key
222                )
223            params[key] = val
224        del params['kwargs']
225        # verify the required parameter 'account_id' is set
226        if ('account_id' not in params) or (params['account_id'] is None):
227            raise ValueError("Missing the required parameter `account_id` when calling `create_document_fields`")
228        # verify the required parameter 'document_id' is set
229        if ('document_id' not in params) or (params['document_id'] is None):
230            raise ValueError("Missing the required parameter `document_id` when calling `create_document_fields`")
231        # verify the required parameter 'template_id' is set
232        if ('template_id' not in params) or (params['template_id'] is None):
233            raise ValueError("Missing the required parameter `template_id` when calling `create_document_fields`")
234
235
236        collection_formats = {}
237
238        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
239        path_params = {}
240        if 'account_id' in params:
241            path_params['accountId'] = params['account_id']
242        if 'document_id' in params:
243            path_params['documentId'] = params['document_id']
244        if 'template_id' in params:
245            path_params['templateId'] = params['template_id']
246
247        query_params = {}
248
249        header_params = {}
250
251        form_params = []
252        local_var_files = {}
253
254        body_params = None
255        if 'document_fields_information' in params:
256            body_params = params['document_fields_information']
257        # HTTP header `Accept`
258        header_params['Accept'] = self.api_client.\
259            select_header_accept(['application/json'])
260
261        # Authentication setting
262        auth_settings = []
263
264        return self.api_client.call_api(resource_path, 'POST',
265                                        path_params,
266                                        query_params,
267                                        header_params,
268                                        body=body_params,
269                                        post_params=form_params,
270                                        files=local_var_files,
271                                        response_type='DocumentFieldsInformation',
272                                        auth_settings=auth_settings,
273                                        callback=params.get('callback'),
274                                        _return_http_data_only=params.get('_return_http_data_only'),
275                                        _preload_content=params.get('_preload_content', True),
276                                        _request_timeout=params.get('_request_timeout'),
277                                        collection_formats=collection_formats)

Creates custom document fields in an existing template document. Creates custom document fields in an existing template document. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentFieldsInformation document_fields_information:
Returns

DocumentFieldsInformation If the method is called asynchronously, returns the request thread.

def create_edit_view(self, account_id, template_id, **kwargs)
279    def create_edit_view(self, account_id, template_id, **kwargs):
280        """
281        Provides a URL to start an edit view of the Template UI
282        This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI.
283        This method makes a synchronous HTTP request by default. To make an
284        asynchronous HTTP request, please define a `callback` function
285        to be invoked when receiving the response.
286        >>> def callback_function(response):
287        >>>     pprint(response)
288        >>>
289        >>> thread = api.create_edit_view(account_id, template_id, callback=callback_function)
290
291        :param callback function: The callback function
292            for asynchronous request. (optional)
293        :param str account_id: The external account number (int) or account ID Guid. (required)
294        :param str template_id: The ID of the template being accessed. (required)
295        :param ReturnUrlRequest return_url_request:
296        :return: ViewUrl
297                 If the method is called asynchronously,
298                 returns the request thread.
299        """
300        kwargs['_return_http_data_only'] = True
301        if kwargs.get('callback'):
302            return self.create_edit_view_with_http_info(account_id, template_id, **kwargs)
303        else:
304            (data) = self.create_edit_view_with_http_info(account_id, template_id, **kwargs)
305            return data

Provides a URL to start an edit view of the Template UI This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_edit_view(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • ReturnUrlRequest return_url_request:
Returns

ViewUrl If the method is called asynchronously, returns the request thread.

def create_edit_view_with_http_info(self, account_id, template_id, **kwargs)
307    def create_edit_view_with_http_info(self, account_id, template_id, **kwargs):
308        """
309        Provides a URL to start an edit view of the Template UI
310        This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI.
311        This method makes a synchronous HTTP request by default. To make an
312        asynchronous HTTP request, please define a `callback` function
313        to be invoked when receiving the response.
314        >>> def callback_function(response):
315        >>>     pprint(response)
316        >>>
317        >>> thread = api.create_edit_view_with_http_info(account_id, template_id, callback=callback_function)
318
319        :param callback function: The callback function
320            for asynchronous request. (optional)
321        :param str account_id: The external account number (int) or account ID Guid. (required)
322        :param str template_id: The ID of the template being accessed. (required)
323        :param ReturnUrlRequest return_url_request:
324        :return: ViewUrl
325                 If the method is called asynchronously,
326                 returns the request thread.
327        """
328
329        all_params = ['account_id', 'template_id', 'return_url_request']
330        all_params.append('callback')
331        all_params.append('_return_http_data_only')
332        all_params.append('_preload_content')
333        all_params.append('_request_timeout')
334
335        params = locals()
336        for key, val in iteritems(params['kwargs']):
337            if key not in all_params:
338                raise TypeError(
339                    "Got an unexpected keyword argument '%s'"
340                    " to method create_edit_view" % key
341                )
342            params[key] = val
343        del params['kwargs']
344        # verify the required parameter 'account_id' is set
345        if ('account_id' not in params) or (params['account_id'] is None):
346            raise ValueError("Missing the required parameter `account_id` when calling `create_edit_view`")
347        # verify the required parameter 'template_id' is set
348        if ('template_id' not in params) or (params['template_id'] is None):
349            raise ValueError("Missing the required parameter `template_id` when calling `create_edit_view`")
350
351
352        collection_formats = {}
353
354        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/edit'.replace('{format}', 'json')
355        path_params = {}
356        if 'account_id' in params:
357            path_params['accountId'] = params['account_id']
358        if 'template_id' in params:
359            path_params['templateId'] = params['template_id']
360
361        query_params = {}
362
363        header_params = {}
364
365        form_params = []
366        local_var_files = {}
367
368        body_params = None
369        if 'return_url_request' in params:
370            body_params = params['return_url_request']
371        # HTTP header `Accept`
372        header_params['Accept'] = self.api_client.\
373            select_header_accept(['application/json'])
374
375        # Authentication setting
376        auth_settings = []
377
378        return self.api_client.call_api(resource_path, 'POST',
379                                        path_params,
380                                        query_params,
381                                        header_params,
382                                        body=body_params,
383                                        post_params=form_params,
384                                        files=local_var_files,
385                                        response_type='ViewUrl',
386                                        auth_settings=auth_settings,
387                                        callback=params.get('callback'),
388                                        _return_http_data_only=params.get('_return_http_data_only'),
389                                        _preload_content=params.get('_preload_content', True),
390                                        _request_timeout=params.get('_request_timeout'),
391                                        collection_formats=collection_formats)

Provides a URL to start an edit view of the Template UI This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_edit_view_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • ReturnUrlRequest return_url_request:
Returns

ViewUrl If the method is called asynchronously, returns the request thread.

def create_lock(self, account_id, template_id, **kwargs)
393    def create_lock(self, account_id, template_id, **kwargs):
394        """
395        Lock a template.
396        Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template.  ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user).
397        This method makes a synchronous HTTP request by default. To make an
398        asynchronous HTTP request, please define a `callback` function
399        to be invoked when receiving the response.
400        >>> def callback_function(response):
401        >>>     pprint(response)
402        >>>
403        >>> thread = api.create_lock(account_id, template_id, callback=callback_function)
404
405        :param callback function: The callback function
406            for asynchronous request. (optional)
407        :param str account_id: The external account number (int) or account ID Guid. (required)
408        :param str template_id: The ID of the template being accessed. (required)
409        :param LockRequest lock_request:
410        :return: LockInformation
411                 If the method is called asynchronously,
412                 returns the request thread.
413        """
414        kwargs['_return_http_data_only'] = True
415        if kwargs.get('callback'):
416            return self.create_lock_with_http_info(account_id, template_id, **kwargs)
417        else:
418            (data) = self.create_lock_with_http_info(account_id, template_id, **kwargs)
419            return data

Lock a template. Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template. ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property canLockEnvelopes must be set to true for the user). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_lock(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • LockRequest lock_request:
Returns

LockInformation If the method is called asynchronously, returns the request thread.

def create_lock_with_http_info(self, account_id, template_id, **kwargs)
421    def create_lock_with_http_info(self, account_id, template_id, **kwargs):
422        """
423        Lock a template.
424        Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template.  ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user).
425        This method makes a synchronous HTTP request by default. To make an
426        asynchronous HTTP request, please define a `callback` function
427        to be invoked when receiving the response.
428        >>> def callback_function(response):
429        >>>     pprint(response)
430        >>>
431        >>> thread = api.create_lock_with_http_info(account_id, template_id, callback=callback_function)
432
433        :param callback function: The callback function
434            for asynchronous request. (optional)
435        :param str account_id: The external account number (int) or account ID Guid. (required)
436        :param str template_id: The ID of the template being accessed. (required)
437        :param LockRequest lock_request:
438        :return: LockInformation
439                 If the method is called asynchronously,
440                 returns the request thread.
441        """
442
443        all_params = ['account_id', 'template_id', 'lock_request']
444        all_params.append('callback')
445        all_params.append('_return_http_data_only')
446        all_params.append('_preload_content')
447        all_params.append('_request_timeout')
448
449        params = locals()
450        for key, val in iteritems(params['kwargs']):
451            if key not in all_params:
452                raise TypeError(
453                    "Got an unexpected keyword argument '%s'"
454                    " to method create_lock" % key
455                )
456            params[key] = val
457        del params['kwargs']
458        # verify the required parameter 'account_id' is set
459        if ('account_id' not in params) or (params['account_id'] is None):
460            raise ValueError("Missing the required parameter `account_id` when calling `create_lock`")
461        # verify the required parameter 'template_id' is set
462        if ('template_id' not in params) or (params['template_id'] is None):
463            raise ValueError("Missing the required parameter `template_id` when calling `create_lock`")
464
465
466        collection_formats = {}
467
468        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
469        path_params = {}
470        if 'account_id' in params:
471            path_params['accountId'] = params['account_id']
472        if 'template_id' in params:
473            path_params['templateId'] = params['template_id']
474
475        query_params = {}
476
477        header_params = {}
478
479        form_params = []
480        local_var_files = {}
481
482        body_params = None
483        if 'lock_request' in params:
484            body_params = params['lock_request']
485        # HTTP header `Accept`
486        header_params['Accept'] = self.api_client.\
487            select_header_accept(['application/json'])
488
489        # Authentication setting
490        auth_settings = []
491
492        return self.api_client.call_api(resource_path, 'POST',
493                                        path_params,
494                                        query_params,
495                                        header_params,
496                                        body=body_params,
497                                        post_params=form_params,
498                                        files=local_var_files,
499                                        response_type='LockInformation',
500                                        auth_settings=auth_settings,
501                                        callback=params.get('callback'),
502                                        _return_http_data_only=params.get('_return_http_data_only'),
503                                        _preload_content=params.get('_preload_content', True),
504                                        _request_timeout=params.get('_request_timeout'),
505                                        collection_formats=collection_formats)

Lock a template. Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template. ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property canLockEnvelopes must be set to true for the user). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_lock_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • LockRequest lock_request:
Returns

LockInformation If the method is called asynchronously, returns the request thread.

def create_recipients(self, account_id, template_id, **kwargs)
507    def create_recipients(self, account_id, template_id, **kwargs):
508        """
509        Adds tabs for a recipient.
510        Adds one or more recipients to a template.
511        This method makes a synchronous HTTP request by default. To make an
512        asynchronous HTTP request, please define a `callback` function
513        to be invoked when receiving the response.
514        >>> def callback_function(response):
515        >>>     pprint(response)
516        >>>
517        >>> thread = api.create_recipients(account_id, template_id, callback=callback_function)
518
519        :param callback function: The callback function
520            for asynchronous request. (optional)
521        :param str account_id: The external account number (int) or account ID Guid. (required)
522        :param str template_id: The ID of the template being accessed. (required)
523        :param str resend_envelope:
524        :param TemplateRecipients template_recipients:
525        :return: Recipients
526                 If the method is called asynchronously,
527                 returns the request thread.
528        """
529        kwargs['_return_http_data_only'] = True
530        if kwargs.get('callback'):
531            return self.create_recipients_with_http_info(account_id, template_id, **kwargs)
532        else:
533            (data) = self.create_recipients_with_http_info(account_id, template_id, **kwargs)
534            return data

Adds tabs for a recipient. Adds one or more recipients to a template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_recipients(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str resend_envelope:
  • TemplateRecipients template_recipients:
Returns

Recipients If the method is called asynchronously, returns the request thread.

def create_recipients_with_http_info(self, account_id, template_id, **kwargs)
536    def create_recipients_with_http_info(self, account_id, template_id, **kwargs):
537        """
538        Adds tabs for a recipient.
539        Adds one or more recipients to a template.
540        This method makes a synchronous HTTP request by default. To make an
541        asynchronous HTTP request, please define a `callback` function
542        to be invoked when receiving the response.
543        >>> def callback_function(response):
544        >>>     pprint(response)
545        >>>
546        >>> thread = api.create_recipients_with_http_info(account_id, template_id, callback=callback_function)
547
548        :param callback function: The callback function
549            for asynchronous request. (optional)
550        :param str account_id: The external account number (int) or account ID Guid. (required)
551        :param str template_id: The ID of the template being accessed. (required)
552        :param str resend_envelope:
553        :param TemplateRecipients template_recipients:
554        :return: Recipients
555                 If the method is called asynchronously,
556                 returns the request thread.
557        """
558
559        all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients']
560        all_params.append('callback')
561        all_params.append('_return_http_data_only')
562        all_params.append('_preload_content')
563        all_params.append('_request_timeout')
564
565        params = locals()
566        for key, val in iteritems(params['kwargs']):
567            if key not in all_params:
568                raise TypeError(
569                    "Got an unexpected keyword argument '%s'"
570                    " to method create_recipients" % key
571                )
572            params[key] = val
573        del params['kwargs']
574        # verify the required parameter 'account_id' is set
575        if ('account_id' not in params) or (params['account_id'] is None):
576            raise ValueError("Missing the required parameter `account_id` when calling `create_recipients`")
577        # verify the required parameter 'template_id' is set
578        if ('template_id' not in params) or (params['template_id'] is None):
579            raise ValueError("Missing the required parameter `template_id` when calling `create_recipients`")
580
581
582        collection_formats = {}
583
584        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
585        path_params = {}
586        if 'account_id' in params:
587            path_params['accountId'] = params['account_id']
588        if 'template_id' in params:
589            path_params['templateId'] = params['template_id']
590
591        query_params = {}
592        if 'resend_envelope' in params:
593            query_params['resend_envelope'] = params['resend_envelope']
594
595        header_params = {}
596
597        form_params = []
598        local_var_files = {}
599
600        body_params = None
601        if 'template_recipients' in params:
602            body_params = params['template_recipients']
603        # HTTP header `Accept`
604        header_params['Accept'] = self.api_client.\
605            select_header_accept(['application/json'])
606
607        # Authentication setting
608        auth_settings = []
609
610        return self.api_client.call_api(resource_path, 'POST',
611                                        path_params,
612                                        query_params,
613                                        header_params,
614                                        body=body_params,
615                                        post_params=form_params,
616                                        files=local_var_files,
617                                        response_type='Recipients',
618                                        auth_settings=auth_settings,
619                                        callback=params.get('callback'),
620                                        _return_http_data_only=params.get('_return_http_data_only'),
621                                        _preload_content=params.get('_preload_content', True),
622                                        _request_timeout=params.get('_request_timeout'),
623                                        collection_formats=collection_formats)

Adds tabs for a recipient. Adds one or more recipients to a template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_recipients_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str resend_envelope:
  • TemplateRecipients template_recipients:
Returns

Recipients If the method is called asynchronously, returns the request thread.

def create_tabs(self, account_id, recipient_id, template_id, **kwargs)
625    def create_tabs(self, account_id, recipient_id, template_id, **kwargs):
626        """
627        Adds tabs for a recipient.
628        Adds one or more tabs for a recipient.
629        This method makes a synchronous HTTP request by default. To make an
630        asynchronous HTTP request, please define a `callback` function
631        to be invoked when receiving the response.
632        >>> def callback_function(response):
633        >>>     pprint(response)
634        >>>
635        >>> thread = api.create_tabs(account_id, recipient_id, template_id, callback=callback_function)
636
637        :param callback function: The callback function
638            for asynchronous request. (optional)
639        :param str account_id: The external account number (int) or account ID Guid. (required)
640        :param str recipient_id: The ID of the recipient being accessed. (required)
641        :param str template_id: The ID of the template being accessed. (required)
642        :param TemplateTabs template_tabs:
643        :return: Tabs
644                 If the method is called asynchronously,
645                 returns the request thread.
646        """
647        kwargs['_return_http_data_only'] = True
648        if kwargs.get('callback'):
649            return self.create_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
650        else:
651            (data) = self.create_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
652            return data

Adds tabs for a recipient. Adds one or more tabs for a recipient. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_tabs(account_id, recipient_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

Tabs If the method is called asynchronously, returns the request thread.

def create_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs)
654    def create_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
655        """
656        Adds tabs for a recipient.
657        Adds one or more tabs for a recipient.
658        This method makes a synchronous HTTP request by default. To make an
659        asynchronous HTTP request, please define a `callback` function
660        to be invoked when receiving the response.
661        >>> def callback_function(response):
662        >>>     pprint(response)
663        >>>
664        >>> thread = api.create_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
665
666        :param callback function: The callback function
667            for asynchronous request. (optional)
668        :param str account_id: The external account number (int) or account ID Guid. (required)
669        :param str recipient_id: The ID of the recipient being accessed. (required)
670        :param str template_id: The ID of the template being accessed. (required)
671        :param TemplateTabs template_tabs:
672        :return: Tabs
673                 If the method is called asynchronously,
674                 returns the request thread.
675        """
676
677        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
678        all_params.append('callback')
679        all_params.append('_return_http_data_only')
680        all_params.append('_preload_content')
681        all_params.append('_request_timeout')
682
683        params = locals()
684        for key, val in iteritems(params['kwargs']):
685            if key not in all_params:
686                raise TypeError(
687                    "Got an unexpected keyword argument '%s'"
688                    " to method create_tabs" % key
689                )
690            params[key] = val
691        del params['kwargs']
692        # verify the required parameter 'account_id' is set
693        if ('account_id' not in params) or (params['account_id'] is None):
694            raise ValueError("Missing the required parameter `account_id` when calling `create_tabs`")
695        # verify the required parameter 'recipient_id' is set
696        if ('recipient_id' not in params) or (params['recipient_id'] is None):
697            raise ValueError("Missing the required parameter `recipient_id` when calling `create_tabs`")
698        # verify the required parameter 'template_id' is set
699        if ('template_id' not in params) or (params['template_id'] is None):
700            raise ValueError("Missing the required parameter `template_id` when calling `create_tabs`")
701
702
703        collection_formats = {}
704
705        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
706        path_params = {}
707        if 'account_id' in params:
708            path_params['accountId'] = params['account_id']
709        if 'recipient_id' in params:
710            path_params['recipientId'] = params['recipient_id']
711        if 'template_id' in params:
712            path_params['templateId'] = params['template_id']
713
714        query_params = {}
715
716        header_params = {}
717
718        form_params = []
719        local_var_files = {}
720
721        body_params = None
722        if 'template_tabs' in params:
723            body_params = params['template_tabs']
724        # HTTP header `Accept`
725        header_params['Accept'] = self.api_client.\
726            select_header_accept(['application/json'])
727
728        # Authentication setting
729        auth_settings = []
730
731        return self.api_client.call_api(resource_path, 'POST',
732                                        path_params,
733                                        query_params,
734                                        header_params,
735                                        body=body_params,
736                                        post_params=form_params,
737                                        files=local_var_files,
738                                        response_type='Tabs',
739                                        auth_settings=auth_settings,
740                                        callback=params.get('callback'),
741                                        _return_http_data_only=params.get('_return_http_data_only'),
742                                        _preload_content=params.get('_preload_content', True),
743                                        _request_timeout=params.get('_request_timeout'),
744                                        collection_formats=collection_formats)

Adds tabs for a recipient. Adds one or more tabs for a recipient. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

Tabs If the method is called asynchronously, returns the request thread.

def create_template(self, account_id, **kwargs)
746    def create_template(self, account_id, **kwargs):
747        """
748        Creates an envelope from a template.
749        Creates a template definition using a multipart request.  ###Template Email Subject Merge Fields  Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template.  The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line.  Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject.  To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_UserName]]  Example:  `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",`  To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_Email]]  Example:  `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",`   In both cases the <roleName> is the recipient's contents of the `roleName` property in the template.  For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject.
750        This method makes a synchronous HTTP request by default. To make an
751        asynchronous HTTP request, please define a `callback` function
752        to be invoked when receiving the response.
753        >>> def callback_function(response):
754        >>>     pprint(response)
755        >>>
756        >>> thread = api.create_template(account_id, callback=callback_function)
757
758        :param callback function: The callback function
759            for asynchronous request. (optional)
760        :param str account_id: The external account number (int) or account ID Guid. (required)
761        :param EnvelopeTemplate envelope_template:
762        :return: TemplateSummary
763                 If the method is called asynchronously,
764                 returns the request thread.
765        """
766        kwargs['_return_http_data_only'] = True
767        if kwargs.get('callback'):
768            return self.create_template_with_http_info(account_id, **kwargs)
769        else:
770            (data) = self.create_template_with_http_info(account_id, **kwargs)
771            return data

Creates an envelope from a template. Creates a template definition using a multipart request. ###Template Email Subject Merge Fields Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's role name, are added to the emailSubject property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. To add a recipient's name in the subject line add the following text in the emailSubject property when creating the template or when sending an envelope from a template: [[_UserName]] Example: "emailSubject":"[[Signer 1_UserName]], Please sign this NDA", To add a recipient's email address in the subject line add the following text in the emailSubject property when creating the template or when sending an envelope from a template: [[_Email]] Example: "emailSubject":"[[Signer 1_Email]], Please sign this NDA", In both cases the is the recipient's contents of the roleName property in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[_UserName]] or [[_Email]] is shown in the email subject. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_template(account_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • EnvelopeTemplate envelope_template:
Returns

TemplateSummary If the method is called asynchronously, returns the request thread.

def create_template_with_http_info(self, account_id, **kwargs)
773    def create_template_with_http_info(self, account_id, **kwargs):
774        """
775        Creates an envelope from a template.
776        Creates a template definition using a multipart request.  ###Template Email Subject Merge Fields  Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template.  The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line.  Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject.  To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_UserName]]  Example:  `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",`  To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_Email]]  Example:  `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",`   In both cases the <roleName> is the recipient's contents of the `roleName` property in the template.  For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject.
777        This method makes a synchronous HTTP request by default. To make an
778        asynchronous HTTP request, please define a `callback` function
779        to be invoked when receiving the response.
780        >>> def callback_function(response):
781        >>>     pprint(response)
782        >>>
783        >>> thread = api.create_template_with_http_info(account_id, callback=callback_function)
784
785        :param callback function: The callback function
786            for asynchronous request. (optional)
787        :param str account_id: The external account number (int) or account ID Guid. (required)
788        :param EnvelopeTemplate envelope_template:
789        :return: TemplateSummary
790                 If the method is called asynchronously,
791                 returns the request thread.
792        """
793
794        all_params = ['account_id', 'envelope_template']
795        all_params.append('callback')
796        all_params.append('_return_http_data_only')
797        all_params.append('_preload_content')
798        all_params.append('_request_timeout')
799
800        params = locals()
801        for key, val in iteritems(params['kwargs']):
802            if key not in all_params:
803                raise TypeError(
804                    "Got an unexpected keyword argument '%s'"
805                    " to method create_template" % key
806                )
807            params[key] = val
808        del params['kwargs']
809        # verify the required parameter 'account_id' is set
810        if ('account_id' not in params) or (params['account_id'] is None):
811            raise ValueError("Missing the required parameter `account_id` when calling `create_template`")
812
813
814        collection_formats = {}
815
816        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
817        path_params = {}
818        if 'account_id' in params:
819            path_params['accountId'] = params['account_id']
820
821        query_params = {}
822
823        header_params = {}
824
825        form_params = []
826        local_var_files = {}
827
828        body_params = None
829        if 'envelope_template' in params:
830            body_params = params['envelope_template']
831        # HTTP header `Accept`
832        header_params['Accept'] = self.api_client.\
833            select_header_accept(['application/json'])
834
835        # Authentication setting
836        auth_settings = []
837
838        return self.api_client.call_api(resource_path, 'POST',
839                                        path_params,
840                                        query_params,
841                                        header_params,
842                                        body=body_params,
843                                        post_params=form_params,
844                                        files=local_var_files,
845                                        response_type='TemplateSummary',
846                                        auth_settings=auth_settings,
847                                        callback=params.get('callback'),
848                                        _return_http_data_only=params.get('_return_http_data_only'),
849                                        _preload_content=params.get('_preload_content', True),
850                                        _request_timeout=params.get('_request_timeout'),
851                                        collection_formats=collection_formats)

Creates an envelope from a template. Creates a template definition using a multipart request. ###Template Email Subject Merge Fields Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's role name, are added to the emailSubject property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. To add a recipient's name in the subject line add the following text in the emailSubject property when creating the template or when sending an envelope from a template: [[_UserName]] Example: "emailSubject":"[[Signer 1_UserName]], Please sign this NDA", To add a recipient's email address in the subject line add the following text in the emailSubject property when creating the template or when sending an envelope from a template: [[_Email]] Example: "emailSubject":"[[Signer 1_Email]], Please sign this NDA", In both cases the is the recipient's contents of the roleName property in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[_UserName]] or [[_Email]] is shown in the email subject. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_template_with_http_info(account_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • EnvelopeTemplate envelope_template:
Returns

TemplateSummary If the method is called asynchronously, returns the request thread.

def create_template_document_responsive_html_preview(self, account_id, document_id, template_id, **kwargs)
853    def create_template_document_responsive_html_preview(self, account_id, document_id, template_id, **kwargs):
854        """
855        Post Responsive HTML Preview for a document in a template.
856        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document.
857        This method makes a synchronous HTTP request by default. To make an
858        asynchronous HTTP request, please define a `callback` function
859        to be invoked when receiving the response.
860        >>> def callback_function(response):
861        >>>     pprint(response)
862        >>>
863        >>> thread = api.create_template_document_responsive_html_preview(account_id, document_id, template_id, callback=callback_function)
864
865        :param callback function: The callback function
866            for asynchronous request. (optional)
867        :param str account_id: The external account number (int) or account ID Guid. (required)
868        :param str document_id: The ID of the document being accessed. (required)
869        :param str template_id: The ID of the template being accessed. (required)
870        :param DocumentHtmlDefinition document_html_definition:
871        :return: DocumentHtmlDefinitions
872                 If the method is called asynchronously,
873                 returns the request thread.
874        """
875        kwargs['_return_http_data_only'] = True
876        if kwargs.get('callback'):
877            return self.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, **kwargs)
878        else:
879            (data) = self.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, **kwargs)
880            return data

Post Responsive HTML Preview for a document in a template. Creates a preview of the responsive, HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending. The request body is a documentHtmlDefinition object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_template_document_responsive_html_preview(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentHtmlDefinition document_html_definition:
Returns

DocumentHtmlDefinitions If the method is called asynchronously, returns the request thread.

def create_template_document_responsive_html_preview_with_http_info(self, account_id, document_id, template_id, **kwargs)
882    def create_template_document_responsive_html_preview_with_http_info(self, account_id, document_id, template_id, **kwargs):
883        """
884        Post Responsive HTML Preview for a document in a template.
885        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document.
886        This method makes a synchronous HTTP request by default. To make an
887        asynchronous HTTP request, please define a `callback` function
888        to be invoked when receiving the response.
889        >>> def callback_function(response):
890        >>>     pprint(response)
891        >>>
892        >>> thread = api.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, callback=callback_function)
893
894        :param callback function: The callback function
895            for asynchronous request. (optional)
896        :param str account_id: The external account number (int) or account ID Guid. (required)
897        :param str document_id: The ID of the document being accessed. (required)
898        :param str template_id: The ID of the template being accessed. (required)
899        :param DocumentHtmlDefinition document_html_definition:
900        :return: DocumentHtmlDefinitions
901                 If the method is called asynchronously,
902                 returns the request thread.
903        """
904
905        all_params = ['account_id', 'document_id', 'template_id', 'document_html_definition']
906        all_params.append('callback')
907        all_params.append('_return_http_data_only')
908        all_params.append('_preload_content')
909        all_params.append('_request_timeout')
910
911        params = locals()
912        for key, val in iteritems(params['kwargs']):
913            if key not in all_params:
914                raise TypeError(
915                    "Got an unexpected keyword argument '%s'"
916                    " to method create_template_document_responsive_html_preview" % key
917                )
918            params[key] = val
919        del params['kwargs']
920        # verify the required parameter 'account_id' is set
921        if ('account_id' not in params) or (params['account_id'] is None):
922            raise ValueError("Missing the required parameter `account_id` when calling `create_template_document_responsive_html_preview`")
923        # verify the required parameter 'document_id' is set
924        if ('document_id' not in params) or (params['document_id'] is None):
925            raise ValueError("Missing the required parameter `document_id` when calling `create_template_document_responsive_html_preview`")
926        # verify the required parameter 'template_id' is set
927        if ('template_id' not in params) or (params['template_id'] is None):
928            raise ValueError("Missing the required parameter `template_id` when calling `create_template_document_responsive_html_preview`")
929
930
931        collection_formats = {}
932
933        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/responsive_html_preview'.replace('{format}', 'json')
934        path_params = {}
935        if 'account_id' in params:
936            path_params['accountId'] = params['account_id']
937        if 'document_id' in params:
938            path_params['documentId'] = params['document_id']
939        if 'template_id' in params:
940            path_params['templateId'] = params['template_id']
941
942        query_params = {}
943
944        header_params = {}
945
946        form_params = []
947        local_var_files = {}
948
949        body_params = None
950        if 'document_html_definition' in params:
951            body_params = params['document_html_definition']
952        # HTTP header `Accept`
953        header_params['Accept'] = self.api_client.\
954            select_header_accept(['application/json'])
955
956        # Authentication setting
957        auth_settings = []
958
959        return self.api_client.call_api(resource_path, 'POST',
960                                        path_params,
961                                        query_params,
962                                        header_params,
963                                        body=body_params,
964                                        post_params=form_params,
965                                        files=local_var_files,
966                                        response_type='DocumentHtmlDefinitions',
967                                        auth_settings=auth_settings,
968                                        callback=params.get('callback'),
969                                        _return_http_data_only=params.get('_return_http_data_only'),
970                                        _preload_content=params.get('_preload_content', True),
971                                        _request_timeout=params.get('_request_timeout'),
972                                        collection_formats=collection_formats)

Post Responsive HTML Preview for a document in a template. Creates a preview of the responsive, HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending. The request body is a documentHtmlDefinition object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentHtmlDefinition document_html_definition:
Returns

DocumentHtmlDefinitions If the method is called asynchronously, returns the request thread.

def create_template_document_tabs(self, account_id, document_id, template_id, **kwargs)
 974    def create_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
 975        """
 976        Adds the tabs to a tempate
 977        Adds tabs to the document specified by `documentId` in the template specified by `templateId`.  In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/templates/templatedocumenttabs/create/#definition__templatetabs_prefilltabs), your request body might look like this:  ``` {   \"prefillTabs\": {     \"textTabs\": [       {         \"value\": \"a prefill text tab\",         \"pageNumber\": \"1\",         \"documentId\": \"1\",         \"xPosition\": 316,         \"yPosition\": 97       }     ]   } } ``` 
 978        This method makes a synchronous HTTP request by default. To make an
 979        asynchronous HTTP request, please define a `callback` function
 980        to be invoked when receiving the response.
 981        >>> def callback_function(response):
 982        >>>     pprint(response)
 983        >>>
 984        >>> thread = api.create_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
 985
 986        :param callback function: The callback function
 987            for asynchronous request. (optional)
 988        :param str account_id: The external account number (int) or account ID Guid. (required)
 989        :param str document_id: The ID of the document being accessed. (required)
 990        :param str template_id: The ID of the template being accessed. (required)
 991        :param TemplateTabs template_tabs:
 992        :return: Tabs
 993                 If the method is called asynchronously,
 994                 returns the request thread.
 995        """
 996        kwargs['_return_http_data_only'] = True
 997        if kwargs.get('callback'):
 998            return self.create_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
 999        else:
1000            (data) = self.create_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
1001            return data

Adds the tabs to a tempate Adds tabs to the document specified by documentId in the template specified by templateId. In the request body, you only need to specify the tabs that your are adding. For example, to add a text prefill tab, your request body might look like this: { "prefillTabs": { "textTabs": [ { "value": "a prefill text tab", "pageNumber": "1", "documentId": "1", "xPosition": 316, "yPosition": 97 } ] } } This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

Tabs If the method is called asynchronously, returns the request thread.

def create_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs)
1003    def create_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
1004        """
1005        Adds the tabs to a tempate
1006        Adds tabs to the document specified by `documentId` in the template specified by `templateId`.  In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/templates/templatedocumenttabs/create/#definition__templatetabs_prefilltabs), your request body might look like this:  ``` {   \"prefillTabs\": {     \"textTabs\": [       {         \"value\": \"a prefill text tab\",         \"pageNumber\": \"1\",         \"documentId\": \"1\",         \"xPosition\": 316,         \"yPosition\": 97       }     ]   } } ``` 
1007        This method makes a synchronous HTTP request by default. To make an
1008        asynchronous HTTP request, please define a `callback` function
1009        to be invoked when receiving the response.
1010        >>> def callback_function(response):
1011        >>>     pprint(response)
1012        >>>
1013        >>> thread = api.create_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
1014
1015        :param callback function: The callback function
1016            for asynchronous request. (optional)
1017        :param str account_id: The external account number (int) or account ID Guid. (required)
1018        :param str document_id: The ID of the document being accessed. (required)
1019        :param str template_id: The ID of the template being accessed. (required)
1020        :param TemplateTabs template_tabs:
1021        :return: Tabs
1022                 If the method is called asynchronously,
1023                 returns the request thread.
1024        """
1025
1026        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
1027        all_params.append('callback')
1028        all_params.append('_return_http_data_only')
1029        all_params.append('_preload_content')
1030        all_params.append('_request_timeout')
1031
1032        params = locals()
1033        for key, val in iteritems(params['kwargs']):
1034            if key not in all_params:
1035                raise TypeError(
1036                    "Got an unexpected keyword argument '%s'"
1037                    " to method create_template_document_tabs" % key
1038                )
1039            params[key] = val
1040        del params['kwargs']
1041        # verify the required parameter 'account_id' is set
1042        if ('account_id' not in params) or (params['account_id'] is None):
1043            raise ValueError("Missing the required parameter `account_id` when calling `create_template_document_tabs`")
1044        # verify the required parameter 'document_id' is set
1045        if ('document_id' not in params) or (params['document_id'] is None):
1046            raise ValueError("Missing the required parameter `document_id` when calling `create_template_document_tabs`")
1047        # verify the required parameter 'template_id' is set
1048        if ('template_id' not in params) or (params['template_id'] is None):
1049            raise ValueError("Missing the required parameter `template_id` when calling `create_template_document_tabs`")
1050
1051
1052        collection_formats = {}
1053
1054        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
1055        path_params = {}
1056        if 'account_id' in params:
1057            path_params['accountId'] = params['account_id']
1058        if 'document_id' in params:
1059            path_params['documentId'] = params['document_id']
1060        if 'template_id' in params:
1061            path_params['templateId'] = params['template_id']
1062
1063        query_params = {}
1064
1065        header_params = {}
1066
1067        form_params = []
1068        local_var_files = {}
1069
1070        body_params = None
1071        if 'template_tabs' in params:
1072            body_params = params['template_tabs']
1073        # HTTP header `Accept`
1074        header_params['Accept'] = self.api_client.\
1075            select_header_accept(['application/json'])
1076
1077        # Authentication setting
1078        auth_settings = []
1079
1080        return self.api_client.call_api(resource_path, 'POST',
1081                                        path_params,
1082                                        query_params,
1083                                        header_params,
1084                                        body=body_params,
1085                                        post_params=form_params,
1086                                        files=local_var_files,
1087                                        response_type='Tabs',
1088                                        auth_settings=auth_settings,
1089                                        callback=params.get('callback'),
1090                                        _return_http_data_only=params.get('_return_http_data_only'),
1091                                        _preload_content=params.get('_preload_content', True),
1092                                        _request_timeout=params.get('_request_timeout'),
1093                                        collection_formats=collection_formats)

Adds the tabs to a tempate Adds tabs to the document specified by documentId in the template specified by templateId. In the request body, you only need to specify the tabs that your are adding. For example, to add a text prefill tab, your request body might look like this: { "prefillTabs": { "textTabs": [ { "value": "a prefill text tab", "pageNumber": "1", "documentId": "1", "xPosition": 316, "yPosition": 97 } ] } } This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

Tabs If the method is called asynchronously, returns the request thread.

def create_template_recipient_preview(self, account_id, template_id, **kwargs)
1095    def create_template_recipient_preview(self, account_id, template_id, **kwargs):
1096        """
1097        Provides a URL to start a recipient view of the Envelope UI
1098        This method returns a URL for a template recipient preview  in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience.  For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents).
1099        This method makes a synchronous HTTP request by default. To make an
1100        asynchronous HTTP request, please define a `callback` function
1101        to be invoked when receiving the response.
1102        >>> def callback_function(response):
1103        >>>     pprint(response)
1104        >>>
1105        >>> thread = api.create_template_recipient_preview(account_id, template_id, callback=callback_function)
1106
1107        :param callback function: The callback function
1108            for asynchronous request. (optional)
1109        :param str account_id: The external account number (int) or account ID Guid. (required)
1110        :param str template_id: The ID of the template being accessed. (required)
1111        :param RecipientPreviewRequest recipient_preview_request:
1112        :return: ViewUrl
1113                 If the method is called asynchronously,
1114                 returns the request thread.
1115        """
1116        kwargs['_return_http_data_only'] = True
1117        if kwargs.get('callback'):
1118            return self.create_template_recipient_preview_with_http_info(account_id, template_id, **kwargs)
1119        else:
1120            (data) = self.create_template_recipient_preview_with_http_info(account_id, template_id, **kwargs)
1121            return data

Provides a URL to start a recipient view of the Envelope UI This method returns a URL for a template recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience. For more information, see Preview and Send. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_template_recipient_preview(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • RecipientPreviewRequest recipient_preview_request:
Returns

ViewUrl If the method is called asynchronously, returns the request thread.

def create_template_recipient_preview_with_http_info(self, account_id, template_id, **kwargs)
1123    def create_template_recipient_preview_with_http_info(self, account_id, template_id, **kwargs):
1124        """
1125        Provides a URL to start a recipient view of the Envelope UI
1126        This method returns a URL for a template recipient preview  in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience.  For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents).
1127        This method makes a synchronous HTTP request by default. To make an
1128        asynchronous HTTP request, please define a `callback` function
1129        to be invoked when receiving the response.
1130        >>> def callback_function(response):
1131        >>>     pprint(response)
1132        >>>
1133        >>> thread = api.create_template_recipient_preview_with_http_info(account_id, template_id, callback=callback_function)
1134
1135        :param callback function: The callback function
1136            for asynchronous request. (optional)
1137        :param str account_id: The external account number (int) or account ID Guid. (required)
1138        :param str template_id: The ID of the template being accessed. (required)
1139        :param RecipientPreviewRequest recipient_preview_request:
1140        :return: ViewUrl
1141                 If the method is called asynchronously,
1142                 returns the request thread.
1143        """
1144
1145        all_params = ['account_id', 'template_id', 'recipient_preview_request']
1146        all_params.append('callback')
1147        all_params.append('_return_http_data_only')
1148        all_params.append('_preload_content')
1149        all_params.append('_request_timeout')
1150
1151        params = locals()
1152        for key, val in iteritems(params['kwargs']):
1153            if key not in all_params:
1154                raise TypeError(
1155                    "Got an unexpected keyword argument '%s'"
1156                    " to method create_template_recipient_preview" % key
1157                )
1158            params[key] = val
1159        del params['kwargs']
1160        # verify the required parameter 'account_id' is set
1161        if ('account_id' not in params) or (params['account_id'] is None):
1162            raise ValueError("Missing the required parameter `account_id` when calling `create_template_recipient_preview`")
1163        # verify the required parameter 'template_id' is set
1164        if ('template_id' not in params) or (params['template_id'] is None):
1165            raise ValueError("Missing the required parameter `template_id` when calling `create_template_recipient_preview`")
1166
1167
1168        collection_formats = {}
1169
1170        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/recipient_preview'.replace('{format}', 'json')
1171        path_params = {}
1172        if 'account_id' in params:
1173            path_params['accountId'] = params['account_id']
1174        if 'template_id' in params:
1175            path_params['templateId'] = params['template_id']
1176
1177        query_params = {}
1178
1179        header_params = {}
1180
1181        form_params = []
1182        local_var_files = {}
1183
1184        body_params = None
1185        if 'recipient_preview_request' in params:
1186            body_params = params['recipient_preview_request']
1187        # HTTP header `Accept`
1188        header_params['Accept'] = self.api_client.\
1189            select_header_accept(['application/json'])
1190
1191        # Authentication setting
1192        auth_settings = []
1193
1194        return self.api_client.call_api(resource_path, 'POST',
1195                                        path_params,
1196                                        query_params,
1197                                        header_params,
1198                                        body=body_params,
1199                                        post_params=form_params,
1200                                        files=local_var_files,
1201                                        response_type='ViewUrl',
1202                                        auth_settings=auth_settings,
1203                                        callback=params.get('callback'),
1204                                        _return_http_data_only=params.get('_return_http_data_only'),
1205                                        _preload_content=params.get('_preload_content', True),
1206                                        _request_timeout=params.get('_request_timeout'),
1207                                        collection_formats=collection_formats)

Provides a URL to start a recipient view of the Envelope UI This method returns a URL for a template recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience. For more information, see Preview and Send. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_template_recipient_preview_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • RecipientPreviewRequest recipient_preview_request:
Returns

ViewUrl If the method is called asynchronously, returns the request thread.

def create_template_responsive_html_preview(self, account_id, template_id, **kwargs)
1209    def create_template_responsive_html_preview(self, account_id, template_id, **kwargs):
1210        """
1211        Get Responsive HTML Preview for all documents in a template.
1212        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents.
1213        This method makes a synchronous HTTP request by default. To make an
1214        asynchronous HTTP request, please define a `callback` function
1215        to be invoked when receiving the response.
1216        >>> def callback_function(response):
1217        >>>     pprint(response)
1218        >>>
1219        >>> thread = api.create_template_responsive_html_preview(account_id, template_id, callback=callback_function)
1220
1221        :param callback function: The callback function
1222            for asynchronous request. (optional)
1223        :param str account_id: The external account number (int) or account ID Guid. (required)
1224        :param str template_id: The ID of the template being accessed. (required)
1225        :param DocumentHtmlDefinition document_html_definition:
1226        :return: DocumentHtmlDefinitions
1227                 If the method is called asynchronously,
1228                 returns the request thread.
1229        """
1230        kwargs['_return_http_data_only'] = True
1231        if kwargs.get('callback'):
1232            return self.create_template_responsive_html_preview_with_http_info(account_id, template_id, **kwargs)
1233        else:
1234            (data) = self.create_template_responsive_html_preview_with_http_info(account_id, template_id, **kwargs)
1235            return data

Get Responsive HTML Preview for all documents in a template. Creates a preview of the responsive, HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a documentHtmlDefinition object, which holds the responsive signing parameters that define how to generate the HTML version of the documents. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_template_responsive_html_preview(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentHtmlDefinition document_html_definition:
Returns

DocumentHtmlDefinitions If the method is called asynchronously, returns the request thread.

def create_template_responsive_html_preview_with_http_info(self, account_id, template_id, **kwargs)
1237    def create_template_responsive_html_preview_with_http_info(self, account_id, template_id, **kwargs):
1238        """
1239        Get Responsive HTML Preview for all documents in a template.
1240        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents.
1241        This method makes a synchronous HTTP request by default. To make an
1242        asynchronous HTTP request, please define a `callback` function
1243        to be invoked when receiving the response.
1244        >>> def callback_function(response):
1245        >>>     pprint(response)
1246        >>>
1247        >>> thread = api.create_template_responsive_html_preview_with_http_info(account_id, template_id, callback=callback_function)
1248
1249        :param callback function: The callback function
1250            for asynchronous request. (optional)
1251        :param str account_id: The external account number (int) or account ID Guid. (required)
1252        :param str template_id: The ID of the template being accessed. (required)
1253        :param DocumentHtmlDefinition document_html_definition:
1254        :return: DocumentHtmlDefinitions
1255                 If the method is called asynchronously,
1256                 returns the request thread.
1257        """
1258
1259        all_params = ['account_id', 'template_id', 'document_html_definition']
1260        all_params.append('callback')
1261        all_params.append('_return_http_data_only')
1262        all_params.append('_preload_content')
1263        all_params.append('_request_timeout')
1264
1265        params = locals()
1266        for key, val in iteritems(params['kwargs']):
1267            if key not in all_params:
1268                raise TypeError(
1269                    "Got an unexpected keyword argument '%s'"
1270                    " to method create_template_responsive_html_preview" % key
1271                )
1272            params[key] = val
1273        del params['kwargs']
1274        # verify the required parameter 'account_id' is set
1275        if ('account_id' not in params) or (params['account_id'] is None):
1276            raise ValueError("Missing the required parameter `account_id` when calling `create_template_responsive_html_preview`")
1277        # verify the required parameter 'template_id' is set
1278        if ('template_id' not in params) or (params['template_id'] is None):
1279            raise ValueError("Missing the required parameter `template_id` when calling `create_template_responsive_html_preview`")
1280
1281
1282        collection_formats = {}
1283
1284        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/responsive_html_preview'.replace('{format}', 'json')
1285        path_params = {}
1286        if 'account_id' in params:
1287            path_params['accountId'] = params['account_id']
1288        if 'template_id' in params:
1289            path_params['templateId'] = params['template_id']
1290
1291        query_params = {}
1292
1293        header_params = {}
1294
1295        form_params = []
1296        local_var_files = {}
1297
1298        body_params = None
1299        if 'document_html_definition' in params:
1300            body_params = params['document_html_definition']
1301        # HTTP header `Accept`
1302        header_params['Accept'] = self.api_client.\
1303            select_header_accept(['application/json'])
1304
1305        # Authentication setting
1306        auth_settings = []
1307
1308        return self.api_client.call_api(resource_path, 'POST',
1309                                        path_params,
1310                                        query_params,
1311                                        header_params,
1312                                        body=body_params,
1313                                        post_params=form_params,
1314                                        files=local_var_files,
1315                                        response_type='DocumentHtmlDefinitions',
1316                                        auth_settings=auth_settings,
1317                                        callback=params.get('callback'),
1318                                        _return_http_data_only=params.get('_return_http_data_only'),
1319                                        _preload_content=params.get('_preload_content', True),
1320                                        _request_timeout=params.get('_request_timeout'),
1321                                        collection_formats=collection_formats)

Get Responsive HTML Preview for all documents in a template. Creates a preview of the responsive, HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a documentHtmlDefinition object, which holds the responsive signing parameters that define how to generate the HTML version of the documents. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_template_responsive_html_preview_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentHtmlDefinition document_html_definition:
Returns

DocumentHtmlDefinitions If the method is called asynchronously, returns the request thread.

def delete_bulk_recipients(self, account_id, recipient_id, template_id, **kwargs)
1323    def delete_bulk_recipients(self, account_id, recipient_id, template_id, **kwargs):
1324        """
1325        Deletes the bulk recipient list on a template.
1326        Deletes the bulk recipient list on a template.
1327        This method makes a synchronous HTTP request by default. To make an
1328        asynchronous HTTP request, please define a `callback` function
1329        to be invoked when receiving the response.
1330        >>> def callback_function(response):
1331        >>>     pprint(response)
1332        >>>
1333        >>> thread = api.delete_bulk_recipients(account_id, recipient_id, template_id, callback=callback_function)
1334
1335        :param callback function: The callback function
1336            for asynchronous request. (optional)
1337        :param str account_id: The external account number (int) or account ID Guid. (required)
1338        :param str recipient_id: The ID of the recipient being accessed. (required)
1339        :param str template_id: The ID of the template being accessed. (required)
1340        :return: BulkRecipientsUpdateResponse
1341                 If the method is called asynchronously,
1342                 returns the request thread.
1343        """
1344        kwargs['_return_http_data_only'] = True
1345        if kwargs.get('callback'):
1346            return self.delete_bulk_recipients_with_http_info(account_id, recipient_id, template_id, **kwargs)
1347        else:
1348            (data) = self.delete_bulk_recipients_with_http_info(account_id, recipient_id, template_id, **kwargs)
1349            return data

Deletes the bulk recipient list on a template. Deletes the bulk recipient list on a template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_bulk_recipients(account_id, recipient_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

BulkRecipientsUpdateResponse If the method is called asynchronously, returns the request thread.

def delete_bulk_recipients_with_http_info(self, account_id, recipient_id, template_id, **kwargs)
1351    def delete_bulk_recipients_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
1352        """
1353        Deletes the bulk recipient list on a template.
1354        Deletes the bulk recipient list on a template.
1355        This method makes a synchronous HTTP request by default. To make an
1356        asynchronous HTTP request, please define a `callback` function
1357        to be invoked when receiving the response.
1358        >>> def callback_function(response):
1359        >>>     pprint(response)
1360        >>>
1361        >>> thread = api.delete_bulk_recipients_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
1362
1363        :param callback function: The callback function
1364            for asynchronous request. (optional)
1365        :param str account_id: The external account number (int) or account ID Guid. (required)
1366        :param str recipient_id: The ID of the recipient being accessed. (required)
1367        :param str template_id: The ID of the template being accessed. (required)
1368        :return: BulkRecipientsUpdateResponse
1369                 If the method is called asynchronously,
1370                 returns the request thread.
1371        """
1372
1373        all_params = ['account_id', 'recipient_id', 'template_id']
1374        all_params.append('callback')
1375        all_params.append('_return_http_data_only')
1376        all_params.append('_preload_content')
1377        all_params.append('_request_timeout')
1378
1379        params = locals()
1380        for key, val in iteritems(params['kwargs']):
1381            if key not in all_params:
1382                raise TypeError(
1383                    "Got an unexpected keyword argument '%s'"
1384                    " to method delete_bulk_recipients" % key
1385                )
1386            params[key] = val
1387        del params['kwargs']
1388        # verify the required parameter 'account_id' is set
1389        if ('account_id' not in params) or (params['account_id'] is None):
1390            raise ValueError("Missing the required parameter `account_id` when calling `delete_bulk_recipients`")
1391        # verify the required parameter 'recipient_id' is set
1392        if ('recipient_id' not in params) or (params['recipient_id'] is None):
1393            raise ValueError("Missing the required parameter `recipient_id` when calling `delete_bulk_recipients`")
1394        # verify the required parameter 'template_id' is set
1395        if ('template_id' not in params) or (params['template_id'] is None):
1396            raise ValueError("Missing the required parameter `template_id` when calling `delete_bulk_recipients`")
1397
1398
1399        collection_formats = {}
1400
1401        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/bulk_recipients'.replace('{format}', 'json')
1402        path_params = {}
1403        if 'account_id' in params:
1404            path_params['accountId'] = params['account_id']
1405        if 'recipient_id' in params:
1406            path_params['recipientId'] = params['recipient_id']
1407        if 'template_id' in params:
1408            path_params['templateId'] = params['template_id']
1409
1410        query_params = {}
1411
1412        header_params = {}
1413
1414        form_params = []
1415        local_var_files = {}
1416
1417        body_params = None
1418        # HTTP header `Accept`
1419        header_params['Accept'] = self.api_client.\
1420            select_header_accept(['application/json'])
1421
1422        # Authentication setting
1423        auth_settings = []
1424
1425        return self.api_client.call_api(resource_path, 'DELETE',
1426                                        path_params,
1427                                        query_params,
1428                                        header_params,
1429                                        body=body_params,
1430                                        post_params=form_params,
1431                                        files=local_var_files,
1432                                        response_type='BulkRecipientsUpdateResponse',
1433                                        auth_settings=auth_settings,
1434                                        callback=params.get('callback'),
1435                                        _return_http_data_only=params.get('_return_http_data_only'),
1436                                        _preload_content=params.get('_preload_content', True),
1437                                        _request_timeout=params.get('_request_timeout'),
1438                                        collection_formats=collection_formats)

Deletes the bulk recipient list on a template. Deletes the bulk recipient list on a template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_bulk_recipients_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

BulkRecipientsUpdateResponse If the method is called asynchronously, returns the request thread.

def delete_custom_fields(self, account_id, template_id, **kwargs)
1440    def delete_custom_fields(self, account_id, template_id, **kwargs):
1441        """
1442        Deletes envelope custom fields in a template.
1443        Deletes envelope custom fields in a template.
1444        This method makes a synchronous HTTP request by default. To make an
1445        asynchronous HTTP request, please define a `callback` function
1446        to be invoked when receiving the response.
1447        >>> def callback_function(response):
1448        >>>     pprint(response)
1449        >>>
1450        >>> thread = api.delete_custom_fields(account_id, template_id, callback=callback_function)
1451
1452        :param callback function: The callback function
1453            for asynchronous request. (optional)
1454        :param str account_id: The external account number (int) or account ID Guid. (required)
1455        :param str template_id: The ID of the template being accessed. (required)
1456        :param TemplateCustomFields template_custom_fields:
1457        :return: CustomFields
1458                 If the method is called asynchronously,
1459                 returns the request thread.
1460        """
1461        kwargs['_return_http_data_only'] = True
1462        if kwargs.get('callback'):
1463            return self.delete_custom_fields_with_http_info(account_id, template_id, **kwargs)
1464        else:
1465            (data) = self.delete_custom_fields_with_http_info(account_id, template_id, **kwargs)
1466            return data

Deletes envelope custom fields in a template. Deletes envelope custom fields in a template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_custom_fields(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateCustomFields template_custom_fields:
Returns

CustomFields If the method is called asynchronously, returns the request thread.

def delete_custom_fields_with_http_info(self, account_id, template_id, **kwargs)
1468    def delete_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
1469        """
1470        Deletes envelope custom fields in a template.
1471        Deletes envelope custom fields in a template.
1472        This method makes a synchronous HTTP request by default. To make an
1473        asynchronous HTTP request, please define a `callback` function
1474        to be invoked when receiving the response.
1475        >>> def callback_function(response):
1476        >>>     pprint(response)
1477        >>>
1478        >>> thread = api.delete_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
1479
1480        :param callback function: The callback function
1481            for asynchronous request. (optional)
1482        :param str account_id: The external account number (int) or account ID Guid. (required)
1483        :param str template_id: The ID of the template being accessed. (required)
1484        :param TemplateCustomFields template_custom_fields:
1485        :return: CustomFields
1486                 If the method is called asynchronously,
1487                 returns the request thread.
1488        """
1489
1490        all_params = ['account_id', 'template_id', 'template_custom_fields']
1491        all_params.append('callback')
1492        all_params.append('_return_http_data_only')
1493        all_params.append('_preload_content')
1494        all_params.append('_request_timeout')
1495
1496        params = locals()
1497        for key, val in iteritems(params['kwargs']):
1498            if key not in all_params:
1499                raise TypeError(
1500                    "Got an unexpected keyword argument '%s'"
1501                    " to method delete_custom_fields" % key
1502                )
1503            params[key] = val
1504        del params['kwargs']
1505        # verify the required parameter 'account_id' is set
1506        if ('account_id' not in params) or (params['account_id'] is None):
1507            raise ValueError("Missing the required parameter `account_id` when calling `delete_custom_fields`")
1508        # verify the required parameter 'template_id' is set
1509        if ('template_id' not in params) or (params['template_id'] is None):
1510            raise ValueError("Missing the required parameter `template_id` when calling `delete_custom_fields`")
1511
1512
1513        collection_formats = {}
1514
1515        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
1516        path_params = {}
1517        if 'account_id' in params:
1518            path_params['accountId'] = params['account_id']
1519        if 'template_id' in params:
1520            path_params['templateId'] = params['template_id']
1521
1522        query_params = {}
1523
1524        header_params = {}
1525
1526        form_params = []
1527        local_var_files = {}
1528
1529        body_params = None
1530        if 'template_custom_fields' in params:
1531            body_params = params['template_custom_fields']
1532        # HTTP header `Accept`
1533        header_params['Accept'] = self.api_client.\
1534            select_header_accept(['application/json'])
1535
1536        # Authentication setting
1537        auth_settings = []
1538
1539        return self.api_client.call_api(resource_path, 'DELETE',
1540                                        path_params,
1541                                        query_params,
1542                                        header_params,
1543                                        body=body_params,
1544                                        post_params=form_params,
1545                                        files=local_var_files,
1546                                        response_type='CustomFields',
1547                                        auth_settings=auth_settings,
1548                                        callback=params.get('callback'),
1549                                        _return_http_data_only=params.get('_return_http_data_only'),
1550                                        _preload_content=params.get('_preload_content', True),
1551                                        _request_timeout=params.get('_request_timeout'),
1552                                        collection_formats=collection_formats)

Deletes envelope custom fields in a template. Deletes envelope custom fields in a template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateCustomFields template_custom_fields:
Returns

CustomFields If the method is called asynchronously, returns the request thread.

def delete_document_fields(self, account_id, document_id, template_id, **kwargs)
1554    def delete_document_fields(self, account_id, document_id, template_id, **kwargs):
1555        """
1556        Deletes custom document fields from an existing template document.
1557        Deletes custom document fields from an existing template document.
1558        This method makes a synchronous HTTP request by default. To make an
1559        asynchronous HTTP request, please define a `callback` function
1560        to be invoked when receiving the response.
1561        >>> def callback_function(response):
1562        >>>     pprint(response)
1563        >>>
1564        >>> thread = api.delete_document_fields(account_id, document_id, template_id, callback=callback_function)
1565
1566        :param callback function: The callback function
1567            for asynchronous request. (optional)
1568        :param str account_id: The external account number (int) or account ID Guid. (required)
1569        :param str document_id: The ID of the document being accessed. (required)
1570        :param str template_id: The ID of the template being accessed. (required)
1571        :param DocumentFieldsInformation document_fields_information:
1572        :return: DocumentFieldsInformation
1573                 If the method is called asynchronously,
1574                 returns the request thread.
1575        """
1576        kwargs['_return_http_data_only'] = True
1577        if kwargs.get('callback'):
1578            return self.delete_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
1579        else:
1580            (data) = self.delete_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
1581            return data

Deletes custom document fields from an existing template document. Deletes custom document fields from an existing template document. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_document_fields(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentFieldsInformation document_fields_information:
Returns

DocumentFieldsInformation If the method is called asynchronously, returns the request thread.

def delete_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs)
1583    def delete_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
1584        """
1585        Deletes custom document fields from an existing template document.
1586        Deletes custom document fields from an existing template document.
1587        This method makes a synchronous HTTP request by default. To make an
1588        asynchronous HTTP request, please define a `callback` function
1589        to be invoked when receiving the response.
1590        >>> def callback_function(response):
1591        >>>     pprint(response)
1592        >>>
1593        >>> thread = api.delete_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
1594
1595        :param callback function: The callback function
1596            for asynchronous request. (optional)
1597        :param str account_id: The external account number (int) or account ID Guid. (required)
1598        :param str document_id: The ID of the document being accessed. (required)
1599        :param str template_id: The ID of the template being accessed. (required)
1600        :param DocumentFieldsInformation document_fields_information:
1601        :return: DocumentFieldsInformation
1602                 If the method is called asynchronously,
1603                 returns the request thread.
1604        """
1605
1606        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
1607        all_params.append('callback')
1608        all_params.append('_return_http_data_only')
1609        all_params.append('_preload_content')
1610        all_params.append('_request_timeout')
1611
1612        params = locals()
1613        for key, val in iteritems(params['kwargs']):
1614            if key not in all_params:
1615                raise TypeError(
1616                    "Got an unexpected keyword argument '%s'"
1617                    " to method delete_document_fields" % key
1618                )
1619            params[key] = val
1620        del params['kwargs']
1621        # verify the required parameter 'account_id' is set
1622        if ('account_id' not in params) or (params['account_id'] is None):
1623            raise ValueError("Missing the required parameter `account_id` when calling `delete_document_fields`")
1624        # verify the required parameter 'document_id' is set
1625        if ('document_id' not in params) or (params['document_id'] is None):
1626            raise ValueError("Missing the required parameter `document_id` when calling `delete_document_fields`")
1627        # verify the required parameter 'template_id' is set
1628        if ('template_id' not in params) or (params['template_id'] is None):
1629            raise ValueError("Missing the required parameter `template_id` when calling `delete_document_fields`")
1630
1631
1632        collection_formats = {}
1633
1634        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
1635        path_params = {}
1636        if 'account_id' in params:
1637            path_params['accountId'] = params['account_id']
1638        if 'document_id' in params:
1639            path_params['documentId'] = params['document_id']
1640        if 'template_id' in params:
1641            path_params['templateId'] = params['template_id']
1642
1643        query_params = {}
1644
1645        header_params = {}
1646
1647        form_params = []
1648        local_var_files = {}
1649
1650        body_params = None
1651        if 'document_fields_information' in params:
1652            body_params = params['document_fields_information']
1653        # HTTP header `Accept`
1654        header_params['Accept'] = self.api_client.\
1655            select_header_accept(['application/json'])
1656
1657        # Authentication setting
1658        auth_settings = []
1659
1660        return self.api_client.call_api(resource_path, 'DELETE',
1661                                        path_params,
1662                                        query_params,
1663                                        header_params,
1664                                        body=body_params,
1665                                        post_params=form_params,
1666                                        files=local_var_files,
1667                                        response_type='DocumentFieldsInformation',
1668                                        auth_settings=auth_settings,
1669                                        callback=params.get('callback'),
1670                                        _return_http_data_only=params.get('_return_http_data_only'),
1671                                        _preload_content=params.get('_preload_content', True),
1672                                        _request_timeout=params.get('_request_timeout'),
1673                                        collection_formats=collection_formats)

Deletes custom document fields from an existing template document. Deletes custom document fields from an existing template document. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentFieldsInformation document_fields_information:
Returns

DocumentFieldsInformation If the method is called asynchronously, returns the request thread.

def delete_document_page(self, account_id, document_id, page_number, template_id, **kwargs)
1675    def delete_document_page(self, account_id, document_id, page_number, template_id, **kwargs):
1676        """
1677        Deletes a page from a document in an template.
1678        Deletes a page from a document in a template based on the page number.
1679        This method makes a synchronous HTTP request by default. To make an
1680        asynchronous HTTP request, please define a `callback` function
1681        to be invoked when receiving the response.
1682        >>> def callback_function(response):
1683        >>>     pprint(response)
1684        >>>
1685        >>> thread = api.delete_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
1686
1687        :param callback function: The callback function
1688            for asynchronous request. (optional)
1689        :param str account_id: The external account number (int) or account ID Guid. (required)
1690        :param str document_id: The ID of the document being accessed. (required)
1691        :param str page_number: The page number being accessed. (required)
1692        :param str template_id: The ID of the template being accessed. (required)
1693        :param PageRequest page_request:
1694        :return: None
1695                 If the method is called asynchronously,
1696                 returns the request thread.
1697        """
1698        kwargs['_return_http_data_only'] = True
1699        if kwargs.get('callback'):
1700            return self.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
1701        else:
1702            (data) = self.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
1703            return data

Deletes a page from a document in an template. Deletes a page from a document in a template based on the page number. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str page_number: The page number being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • PageRequest page_request:
Returns

None If the method is called asynchronously, returns the request thread.

def delete_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs)
1705    def delete_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
1706        """
1707        Deletes a page from a document in an template.
1708        Deletes a page from a document in a template based on the page number.
1709        This method makes a synchronous HTTP request by default. To make an
1710        asynchronous HTTP request, please define a `callback` function
1711        to be invoked when receiving the response.
1712        >>> def callback_function(response):
1713        >>>     pprint(response)
1714        >>>
1715        >>> thread = api.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
1716
1717        :param callback function: The callback function
1718            for asynchronous request. (optional)
1719        :param str account_id: The external account number (int) or account ID Guid. (required)
1720        :param str document_id: The ID of the document being accessed. (required)
1721        :param str page_number: The page number being accessed. (required)
1722        :param str template_id: The ID of the template being accessed. (required)
1723        :param PageRequest page_request:
1724        :return: None
1725                 If the method is called asynchronously,
1726                 returns the request thread.
1727        """
1728
1729        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request']
1730        all_params.append('callback')
1731        all_params.append('_return_http_data_only')
1732        all_params.append('_preload_content')
1733        all_params.append('_request_timeout')
1734
1735        params = locals()
1736        for key, val in iteritems(params['kwargs']):
1737            if key not in all_params:
1738                raise TypeError(
1739                    "Got an unexpected keyword argument '%s'"
1740                    " to method delete_document_page" % key
1741                )
1742            params[key] = val
1743        del params['kwargs']
1744        # verify the required parameter 'account_id' is set
1745        if ('account_id' not in params) or (params['account_id'] is None):
1746            raise ValueError("Missing the required parameter `account_id` when calling `delete_document_page`")
1747        # verify the required parameter 'document_id' is set
1748        if ('document_id' not in params) or (params['document_id'] is None):
1749            raise ValueError("Missing the required parameter `document_id` when calling `delete_document_page`")
1750        # verify the required parameter 'page_number' is set
1751        if ('page_number' not in params) or (params['page_number'] is None):
1752            raise ValueError("Missing the required parameter `page_number` when calling `delete_document_page`")
1753        # verify the required parameter 'template_id' is set
1754        if ('template_id' not in params) or (params['template_id'] is None):
1755            raise ValueError("Missing the required parameter `template_id` when calling `delete_document_page`")
1756
1757
1758        collection_formats = {}
1759
1760        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}'.replace('{format}', 'json')
1761        path_params = {}
1762        if 'account_id' in params:
1763            path_params['accountId'] = params['account_id']
1764        if 'document_id' in params:
1765            path_params['documentId'] = params['document_id']
1766        if 'page_number' in params:
1767            path_params['pageNumber'] = params['page_number']
1768        if 'template_id' in params:
1769            path_params['templateId'] = params['template_id']
1770
1771        query_params = {}
1772
1773        header_params = {}
1774
1775        form_params = []
1776        local_var_files = {}
1777
1778        body_params = None
1779        if 'page_request' in params:
1780            body_params = params['page_request']
1781        # HTTP header `Accept`
1782        header_params['Accept'] = self.api_client.\
1783            select_header_accept(['application/json'])
1784
1785        # Authentication setting
1786        auth_settings = []
1787
1788        return self.api_client.call_api(resource_path, 'DELETE',
1789                                        path_params,
1790                                        query_params,
1791                                        header_params,
1792                                        body=body_params,
1793                                        post_params=form_params,
1794                                        files=local_var_files,
1795                                        response_type=None,
1796                                        auth_settings=auth_settings,
1797                                        callback=params.get('callback'),
1798                                        _return_http_data_only=params.get('_return_http_data_only'),
1799                                        _preload_content=params.get('_preload_content', True),
1800                                        _request_timeout=params.get('_request_timeout'),
1801                                        collection_formats=collection_formats)

Deletes a page from a document in an template. Deletes a page from a document in a template based on the page number. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str page_number: The page number being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • PageRequest page_request:
Returns

None If the method is called asynchronously, returns the request thread.

def delete_documents(self, account_id, template_id, **kwargs)
1803    def delete_documents(self, account_id, template_id, **kwargs):
1804        """
1805        Deletes documents from a template.
1806        Deletes one or more documents from an existing template.
1807        This method makes a synchronous HTTP request by default. To make an
1808        asynchronous HTTP request, please define a `callback` function
1809        to be invoked when receiving the response.
1810        >>> def callback_function(response):
1811        >>>     pprint(response)
1812        >>>
1813        >>> thread = api.delete_documents(account_id, template_id, callback=callback_function)
1814
1815        :param callback function: The callback function
1816            for asynchronous request. (optional)
1817        :param str account_id: The external account number (int) or account ID Guid. (required)
1818        :param str template_id: The ID of the template being accessed. (required)
1819        :param EnvelopeDefinition envelope_definition:
1820        :return: TemplateDocumentsResult
1821                 If the method is called asynchronously,
1822                 returns the request thread.
1823        """
1824        kwargs['_return_http_data_only'] = True
1825        if kwargs.get('callback'):
1826            return self.delete_documents_with_http_info(account_id, template_id, **kwargs)
1827        else:
1828            (data) = self.delete_documents_with_http_info(account_id, template_id, **kwargs)
1829            return data

Deletes documents from a template. Deletes one or more documents from an existing template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_documents(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • EnvelopeDefinition envelope_definition:
Returns

TemplateDocumentsResult If the method is called asynchronously, returns the request thread.

def delete_documents_with_http_info(self, account_id, template_id, **kwargs)
1831    def delete_documents_with_http_info(self, account_id, template_id, **kwargs):
1832        """
1833        Deletes documents from a template.
1834        Deletes one or more documents from an existing template.
1835        This method makes a synchronous HTTP request by default. To make an
1836        asynchronous HTTP request, please define a `callback` function
1837        to be invoked when receiving the response.
1838        >>> def callback_function(response):
1839        >>>     pprint(response)
1840        >>>
1841        >>> thread = api.delete_documents_with_http_info(account_id, template_id, callback=callback_function)
1842
1843        :param callback function: The callback function
1844            for asynchronous request. (optional)
1845        :param str account_id: The external account number (int) or account ID Guid. (required)
1846        :param str template_id: The ID of the template being accessed. (required)
1847        :param EnvelopeDefinition envelope_definition:
1848        :return: TemplateDocumentsResult
1849                 If the method is called asynchronously,
1850                 returns the request thread.
1851        """
1852
1853        all_params = ['account_id', 'template_id', 'envelope_definition']
1854        all_params.append('callback')
1855        all_params.append('_return_http_data_only')
1856        all_params.append('_preload_content')
1857        all_params.append('_request_timeout')
1858
1859        params = locals()
1860        for key, val in iteritems(params['kwargs']):
1861            if key not in all_params:
1862                raise TypeError(
1863                    "Got an unexpected keyword argument '%s'"
1864                    " to method delete_documents" % key
1865                )
1866            params[key] = val
1867        del params['kwargs']
1868        # verify the required parameter 'account_id' is set
1869        if ('account_id' not in params) or (params['account_id'] is None):
1870            raise ValueError("Missing the required parameter `account_id` when calling `delete_documents`")
1871        # verify the required parameter 'template_id' is set
1872        if ('template_id' not in params) or (params['template_id'] is None):
1873            raise ValueError("Missing the required parameter `template_id` when calling `delete_documents`")
1874
1875
1876        collection_formats = {}
1877
1878        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
1879        path_params = {}
1880        if 'account_id' in params:
1881            path_params['accountId'] = params['account_id']
1882        if 'template_id' in params:
1883            path_params['templateId'] = params['template_id']
1884
1885        query_params = {}
1886
1887        header_params = {}
1888
1889        form_params = []
1890        local_var_files = {}
1891
1892        body_params = None
1893        if 'envelope_definition' in params:
1894            body_params = params['envelope_definition']
1895        # HTTP header `Accept`
1896        header_params['Accept'] = self.api_client.\
1897            select_header_accept(['application/json'])
1898
1899        # Authentication setting
1900        auth_settings = []
1901
1902        return self.api_client.call_api(resource_path, 'DELETE',
1903                                        path_params,
1904                                        query_params,
1905                                        header_params,
1906                                        body=body_params,
1907                                        post_params=form_params,
1908                                        files=local_var_files,
1909                                        response_type='TemplateDocumentsResult',
1910                                        auth_settings=auth_settings,
1911                                        callback=params.get('callback'),
1912                                        _return_http_data_only=params.get('_return_http_data_only'),
1913                                        _preload_content=params.get('_preload_content', True),
1914                                        _request_timeout=params.get('_request_timeout'),
1915                                        collection_formats=collection_formats)

Deletes documents from a template. Deletes one or more documents from an existing template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_documents_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • EnvelopeDefinition envelope_definition:
Returns

TemplateDocumentsResult If the method is called asynchronously, returns the request thread.

def delete_group_share(self, account_id, template_id, template_part, **kwargs)
1917    def delete_group_share(self, account_id, template_id, template_part, **kwargs):
1918        """
1919        Removes a member group's sharing permissions for a template.
1920        Removes a member group's sharing permissions for a specified template.
1921        This method makes a synchronous HTTP request by default. To make an
1922        asynchronous HTTP request, please define a `callback` function
1923        to be invoked when receiving the response.
1924        >>> def callback_function(response):
1925        >>>     pprint(response)
1926        >>>
1927        >>> thread = api.delete_group_share(account_id, template_id, template_part, callback=callback_function)
1928
1929        :param callback function: The callback function
1930            for asynchronous request. (optional)
1931        :param str account_id: The external account number (int) or account ID Guid. (required)
1932        :param str template_id: The ID of the template being accessed. (required)
1933        :param str template_part: Currently, the only defined part is **groups**. (required)
1934        :param GroupInformation group_information:
1935        :return: GroupInformation
1936                 If the method is called asynchronously,
1937                 returns the request thread.
1938        """
1939        kwargs['_return_http_data_only'] = True
1940        if kwargs.get('callback'):
1941            return self.delete_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
1942        else:
1943            (data) = self.delete_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
1944            return data

Removes a member group's sharing permissions for a template. Removes a member group's sharing permissions for a specified template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_group_share(account_id, template_id, template_part, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str template_part: Currently, the only defined part is groups. (required)
  • GroupInformation group_information:
Returns

GroupInformation If the method is called asynchronously, returns the request thread.

def delete_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs)
1946    def delete_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs):
1947        """
1948        Removes a member group's sharing permissions for a template.
1949        Removes a member group's sharing permissions for a specified template.
1950        This method makes a synchronous HTTP request by default. To make an
1951        asynchronous HTTP request, please define a `callback` function
1952        to be invoked when receiving the response.
1953        >>> def callback_function(response):
1954        >>>     pprint(response)
1955        >>>
1956        >>> thread = api.delete_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
1957
1958        :param callback function: The callback function
1959            for asynchronous request. (optional)
1960        :param str account_id: The external account number (int) or account ID Guid. (required)
1961        :param str template_id: The ID of the template being accessed. (required)
1962        :param str template_part: Currently, the only defined part is **groups**. (required)
1963        :param GroupInformation group_information:
1964        :return: GroupInformation
1965                 If the method is called asynchronously,
1966                 returns the request thread.
1967        """
1968
1969        all_params = ['account_id', 'template_id', 'template_part', 'group_information']
1970        all_params.append('callback')
1971        all_params.append('_return_http_data_only')
1972        all_params.append('_preload_content')
1973        all_params.append('_request_timeout')
1974
1975        params = locals()
1976        for key, val in iteritems(params['kwargs']):
1977            if key not in all_params:
1978                raise TypeError(
1979                    "Got an unexpected keyword argument '%s'"
1980                    " to method delete_group_share" % key
1981                )
1982            params[key] = val
1983        del params['kwargs']
1984        # verify the required parameter 'account_id' is set
1985        if ('account_id' not in params) or (params['account_id'] is None):
1986            raise ValueError("Missing the required parameter `account_id` when calling `delete_group_share`")
1987        # verify the required parameter 'template_id' is set
1988        if ('template_id' not in params) or (params['template_id'] is None):
1989            raise ValueError("Missing the required parameter `template_id` when calling `delete_group_share`")
1990        # verify the required parameter 'template_part' is set
1991        if ('template_part' not in params) or (params['template_part'] is None):
1992            raise ValueError("Missing the required parameter `template_part` when calling `delete_group_share`")
1993
1994
1995        collection_formats = {}
1996
1997        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json')
1998        path_params = {}
1999        if 'account_id' in params:
2000            path_params['accountId'] = params['account_id']
2001        if 'template_id' in params:
2002            path_params['templateId'] = params['template_id']
2003        if 'template_part' in params:
2004            path_params['templatePart'] = params['template_part']
2005
2006        query_params = {}
2007
2008        header_params = {}
2009
2010        form_params = []
2011        local_var_files = {}
2012
2013        body_params = None
2014        if 'group_information' in params:
2015            body_params = params['group_information']
2016        # HTTP header `Accept`
2017        header_params['Accept'] = self.api_client.\
2018            select_header_accept(['application/json'])
2019
2020        # Authentication setting
2021        auth_settings = []
2022
2023        return self.api_client.call_api(resource_path, 'DELETE',
2024                                        path_params,
2025                                        query_params,
2026                                        header_params,
2027                                        body=body_params,
2028                                        post_params=form_params,
2029                                        files=local_var_files,
2030                                        response_type='GroupInformation',
2031                                        auth_settings=auth_settings,
2032                                        callback=params.get('callback'),
2033                                        _return_http_data_only=params.get('_return_http_data_only'),
2034                                        _preload_content=params.get('_preload_content', True),
2035                                        _request_timeout=params.get('_request_timeout'),
2036                                        collection_formats=collection_formats)

Removes a member group's sharing permissions for a template. Removes a member group's sharing permissions for a specified template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str template_part: Currently, the only defined part is groups. (required)
  • GroupInformation group_information:
Returns

GroupInformation If the method is called asynchronously, returns the request thread.

def delete_lock(self, account_id, template_id, **kwargs)
2038    def delete_lock(self, account_id, template_id, **kwargs):
2039        """
2040        Deletes a template lock.
2041        Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request.
2042        This method makes a synchronous HTTP request by default. To make an
2043        asynchronous HTTP request, please define a `callback` function
2044        to be invoked when receiving the response.
2045        >>> def callback_function(response):
2046        >>>     pprint(response)
2047        >>>
2048        >>> thread = api.delete_lock(account_id, template_id, callback=callback_function)
2049
2050        :param callback function: The callback function
2051            for asynchronous request. (optional)
2052        :param str account_id: The external account number (int) or account ID Guid. (required)
2053        :param str template_id: The ID of the template being accessed. (required)
2054        :param LockRequest lock_request:
2055        :return: LockInformation
2056                 If the method is called asynchronously,
2057                 returns the request thread.
2058        """
2059        kwargs['_return_http_data_only'] = True
2060        if kwargs.get('callback'):
2061            return self.delete_lock_with_http_info(account_id, template_id, **kwargs)
2062        else:
2063            (data) = self.delete_lock_with_http_info(account_id, template_id, **kwargs)
2064            return data

Deletes a template lock. Deletes the lock from the specified template. The X-DocuSign-Edit header must be included in the request. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_lock(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • LockRequest lock_request:
Returns

LockInformation If the method is called asynchronously, returns the request thread.

def delete_lock_with_http_info(self, account_id, template_id, **kwargs)
2066    def delete_lock_with_http_info(self, account_id, template_id, **kwargs):
2067        """
2068        Deletes a template lock.
2069        Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request.
2070        This method makes a synchronous HTTP request by default. To make an
2071        asynchronous HTTP request, please define a `callback` function
2072        to be invoked when receiving the response.
2073        >>> def callback_function(response):
2074        >>>     pprint(response)
2075        >>>
2076        >>> thread = api.delete_lock_with_http_info(account_id, template_id, callback=callback_function)
2077
2078        :param callback function: The callback function
2079            for asynchronous request. (optional)
2080        :param str account_id: The external account number (int) or account ID Guid. (required)
2081        :param str template_id: The ID of the template being accessed. (required)
2082        :param LockRequest lock_request:
2083        :return: LockInformation
2084                 If the method is called asynchronously,
2085                 returns the request thread.
2086        """
2087
2088        all_params = ['account_id', 'template_id', 'lock_request']
2089        all_params.append('callback')
2090        all_params.append('_return_http_data_only')
2091        all_params.append('_preload_content')
2092        all_params.append('_request_timeout')
2093
2094        params = locals()
2095        for key, val in iteritems(params['kwargs']):
2096            if key not in all_params:
2097                raise TypeError(
2098                    "Got an unexpected keyword argument '%s'"
2099                    " to method delete_lock" % key
2100                )
2101            params[key] = val
2102        del params['kwargs']
2103        # verify the required parameter 'account_id' is set
2104        if ('account_id' not in params) or (params['account_id'] is None):
2105            raise ValueError("Missing the required parameter `account_id` when calling `delete_lock`")
2106        # verify the required parameter 'template_id' is set
2107        if ('template_id' not in params) or (params['template_id'] is None):
2108            raise ValueError("Missing the required parameter `template_id` when calling `delete_lock`")
2109
2110
2111        collection_formats = {}
2112
2113        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
2114        path_params = {}
2115        if 'account_id' in params:
2116            path_params['accountId'] = params['account_id']
2117        if 'template_id' in params:
2118            path_params['templateId'] = params['template_id']
2119
2120        query_params = {}
2121
2122        header_params = {}
2123
2124        form_params = []
2125        local_var_files = {}
2126
2127        body_params = None
2128        if 'lock_request' in params:
2129            body_params = params['lock_request']
2130        # HTTP header `Accept`
2131        header_params['Accept'] = self.api_client.\
2132            select_header_accept(['application/json'])
2133
2134        # Authentication setting
2135        auth_settings = []
2136
2137        return self.api_client.call_api(resource_path, 'DELETE',
2138                                        path_params,
2139                                        query_params,
2140                                        header_params,
2141                                        body=body_params,
2142                                        post_params=form_params,
2143                                        files=local_var_files,
2144                                        response_type='LockInformation',
2145                                        auth_settings=auth_settings,
2146                                        callback=params.get('callback'),
2147                                        _return_http_data_only=params.get('_return_http_data_only'),
2148                                        _preload_content=params.get('_preload_content', True),
2149                                        _request_timeout=params.get('_request_timeout'),
2150                                        collection_formats=collection_formats)

Deletes a template lock. Deletes the lock from the specified template. The X-DocuSign-Edit header must be included in the request. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_lock_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • LockRequest lock_request:
Returns

LockInformation If the method is called asynchronously, returns the request thread.

def delete_recipient(self, account_id, recipient_id, template_id, **kwargs)
2152    def delete_recipient(self, account_id, recipient_id, template_id, **kwargs):
2153        """
2154        Deletes the specified recipient file from a template.
2155        Deletes the specified recipient file from the specified template.
2156        This method makes a synchronous HTTP request by default. To make an
2157        asynchronous HTTP request, please define a `callback` function
2158        to be invoked when receiving the response.
2159        >>> def callback_function(response):
2160        >>>     pprint(response)
2161        >>>
2162        >>> thread = api.delete_recipient(account_id, recipient_id, template_id, callback=callback_function)
2163
2164        :param callback function: The callback function
2165            for asynchronous request. (optional)
2166        :param str account_id: The external account number (int) or account ID Guid. (required)
2167        :param str recipient_id: The ID of the recipient being accessed. (required)
2168        :param str template_id: The ID of the template being accessed. (required)
2169        :param TemplateRecipients template_recipients:
2170        :return: Recipients
2171                 If the method is called asynchronously,
2172                 returns the request thread.
2173        """
2174        kwargs['_return_http_data_only'] = True
2175        if kwargs.get('callback'):
2176            return self.delete_recipient_with_http_info(account_id, recipient_id, template_id, **kwargs)
2177        else:
2178            (data) = self.delete_recipient_with_http_info(account_id, recipient_id, template_id, **kwargs)
2179            return data

Deletes the specified recipient file from a template. Deletes the specified recipient file from the specified template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_recipient(account_id, recipient_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateRecipients template_recipients:
Returns

Recipients If the method is called asynchronously, returns the request thread.

def delete_recipient_with_http_info(self, account_id, recipient_id, template_id, **kwargs)
2181    def delete_recipient_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
2182        """
2183        Deletes the specified recipient file from a template.
2184        Deletes the specified recipient file from the specified template.
2185        This method makes a synchronous HTTP request by default. To make an
2186        asynchronous HTTP request, please define a `callback` function
2187        to be invoked when receiving the response.
2188        >>> def callback_function(response):
2189        >>>     pprint(response)
2190        >>>
2191        >>> thread = api.delete_recipient_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
2192
2193        :param callback function: The callback function
2194            for asynchronous request. (optional)
2195        :param str account_id: The external account number (int) or account ID Guid. (required)
2196        :param str recipient_id: The ID of the recipient being accessed. (required)
2197        :param str template_id: The ID of the template being accessed. (required)
2198        :param TemplateRecipients template_recipients:
2199        :return: Recipients
2200                 If the method is called asynchronously,
2201                 returns the request thread.
2202        """
2203
2204        all_params = ['account_id', 'recipient_id', 'template_id', 'template_recipients']
2205        all_params.append('callback')
2206        all_params.append('_return_http_data_only')
2207        all_params.append('_preload_content')
2208        all_params.append('_request_timeout')
2209
2210        params = locals()
2211        for key, val in iteritems(params['kwargs']):
2212            if key not in all_params:
2213                raise TypeError(
2214                    "Got an unexpected keyword argument '%s'"
2215                    " to method delete_recipient" % key
2216                )
2217            params[key] = val
2218        del params['kwargs']
2219        # verify the required parameter 'account_id' is set
2220        if ('account_id' not in params) or (params['account_id'] is None):
2221            raise ValueError("Missing the required parameter `account_id` when calling `delete_recipient`")
2222        # verify the required parameter 'recipient_id' is set
2223        if ('recipient_id' not in params) or (params['recipient_id'] is None):
2224            raise ValueError("Missing the required parameter `recipient_id` when calling `delete_recipient`")
2225        # verify the required parameter 'template_id' is set
2226        if ('template_id' not in params) or (params['template_id'] is None):
2227            raise ValueError("Missing the required parameter `template_id` when calling `delete_recipient`")
2228
2229
2230        collection_formats = {}
2231
2232        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}'.replace('{format}', 'json')
2233        path_params = {}
2234        if 'account_id' in params:
2235            path_params['accountId'] = params['account_id']
2236        if 'recipient_id' in params:
2237            path_params['recipientId'] = params['recipient_id']
2238        if 'template_id' in params:
2239            path_params['templateId'] = params['template_id']
2240
2241        query_params = {}
2242
2243        header_params = {}
2244
2245        form_params = []
2246        local_var_files = {}
2247
2248        body_params = None
2249        if 'template_recipients' in params:
2250            body_params = params['template_recipients']
2251        # HTTP header `Accept`
2252        header_params['Accept'] = self.api_client.\
2253            select_header_accept(['application/json'])
2254
2255        # Authentication setting
2256        auth_settings = []
2257
2258        return self.api_client.call_api(resource_path, 'DELETE',
2259                                        path_params,
2260                                        query_params,
2261                                        header_params,
2262                                        body=body_params,
2263                                        post_params=form_params,
2264                                        files=local_var_files,
2265                                        response_type='Recipients',
2266                                        auth_settings=auth_settings,
2267                                        callback=params.get('callback'),
2268                                        _return_http_data_only=params.get('_return_http_data_only'),
2269                                        _preload_content=params.get('_preload_content', True),
2270                                        _request_timeout=params.get('_request_timeout'),
2271                                        collection_formats=collection_formats)

Deletes the specified recipient file from a template. Deletes the specified recipient file from the specified template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_recipient_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateRecipients template_recipients:
Returns

Recipients If the method is called asynchronously, returns the request thread.

def delete_recipients(self, account_id, template_id, **kwargs)
2273    def delete_recipients(self, account_id, template_id, **kwargs):
2274        """
2275        Deletes recipients from a template.
2276        Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients.
2277        This method makes a synchronous HTTP request by default. To make an
2278        asynchronous HTTP request, please define a `callback` function
2279        to be invoked when receiving the response.
2280        >>> def callback_function(response):
2281        >>>     pprint(response)
2282        >>>
2283        >>> thread = api.delete_recipients(account_id, template_id, callback=callback_function)
2284
2285        :param callback function: The callback function
2286            for asynchronous request. (optional)
2287        :param str account_id: The external account number (int) or account ID Guid. (required)
2288        :param str template_id: The ID of the template being accessed. (required)
2289        :param TemplateRecipients template_recipients:
2290        :return: Recipients
2291                 If the method is called asynchronously,
2292                 returns the request thread.
2293        """
2294        kwargs['_return_http_data_only'] = True
2295        if kwargs.get('callback'):
2296            return self.delete_recipients_with_http_info(account_id, template_id, **kwargs)
2297        else:
2298            (data) = self.delete_recipients_with_http_info(account_id, template_id, **kwargs)
2299            return data

Deletes recipients from a template. Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the recipientId being used as the key for deleting recipients. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_recipients(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateRecipients template_recipients:
Returns

Recipients If the method is called asynchronously, returns the request thread.

def delete_recipients_with_http_info(self, account_id, template_id, **kwargs)
2301    def delete_recipients_with_http_info(self, account_id, template_id, **kwargs):
2302        """
2303        Deletes recipients from a template.
2304        Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients.
2305        This method makes a synchronous HTTP request by default. To make an
2306        asynchronous HTTP request, please define a `callback` function
2307        to be invoked when receiving the response.
2308        >>> def callback_function(response):
2309        >>>     pprint(response)
2310        >>>
2311        >>> thread = api.delete_recipients_with_http_info(account_id, template_id, callback=callback_function)
2312
2313        :param callback function: The callback function
2314            for asynchronous request. (optional)
2315        :param str account_id: The external account number (int) or account ID Guid. (required)
2316        :param str template_id: The ID of the template being accessed. (required)
2317        :param TemplateRecipients template_recipients:
2318        :return: Recipients
2319                 If the method is called asynchronously,
2320                 returns the request thread.
2321        """
2322
2323        all_params = ['account_id', 'template_id', 'template_recipients']
2324        all_params.append('callback')
2325        all_params.append('_return_http_data_only')
2326        all_params.append('_preload_content')
2327        all_params.append('_request_timeout')
2328
2329        params = locals()
2330        for key, val in iteritems(params['kwargs']):
2331            if key not in all_params:
2332                raise TypeError(
2333                    "Got an unexpected keyword argument '%s'"
2334                    " to method delete_recipients" % key
2335                )
2336            params[key] = val
2337        del params['kwargs']
2338        # verify the required parameter 'account_id' is set
2339        if ('account_id' not in params) or (params['account_id'] is None):
2340            raise ValueError("Missing the required parameter `account_id` when calling `delete_recipients`")
2341        # verify the required parameter 'template_id' is set
2342        if ('template_id' not in params) or (params['template_id'] is None):
2343            raise ValueError("Missing the required parameter `template_id` when calling `delete_recipients`")
2344
2345
2346        collection_formats = {}
2347
2348        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
2349        path_params = {}
2350        if 'account_id' in params:
2351            path_params['accountId'] = params['account_id']
2352        if 'template_id' in params:
2353            path_params['templateId'] = params['template_id']
2354
2355        query_params = {}
2356
2357        header_params = {}
2358
2359        form_params = []
2360        local_var_files = {}
2361
2362        body_params = None
2363        if 'template_recipients' in params:
2364            body_params = params['template_recipients']
2365        # HTTP header `Accept`
2366        header_params['Accept'] = self.api_client.\
2367            select_header_accept(['application/json'])
2368
2369        # Authentication setting
2370        auth_settings = []
2371
2372        return self.api_client.call_api(resource_path, 'DELETE',
2373                                        path_params,
2374                                        query_params,
2375                                        header_params,
2376                                        body=body_params,
2377                                        post_params=form_params,
2378                                        files=local_var_files,
2379                                        response_type='Recipients',
2380                                        auth_settings=auth_settings,
2381                                        callback=params.get('callback'),
2382                                        _return_http_data_only=params.get('_return_http_data_only'),
2383                                        _preload_content=params.get('_preload_content', True),
2384                                        _request_timeout=params.get('_request_timeout'),
2385                                        collection_formats=collection_formats)

Deletes recipients from a template. Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the recipientId being used as the key for deleting recipients. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_recipients_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateRecipients template_recipients:
Returns

Recipients If the method is called asynchronously, returns the request thread.

def delete_tabs(self, account_id, recipient_id, template_id, **kwargs)
2387    def delete_tabs(self, account_id, recipient_id, template_id, **kwargs):
2388        """
2389        Deletes the tabs associated with a recipient in a template.
2390        Deletes one or more tabs associated with a recipient in a template.
2391        This method makes a synchronous HTTP request by default. To make an
2392        asynchronous HTTP request, please define a `callback` function
2393        to be invoked when receiving the response.
2394        >>> def callback_function(response):
2395        >>>     pprint(response)
2396        >>>
2397        >>> thread = api.delete_tabs(account_id, recipient_id, template_id, callback=callback_function)
2398
2399        :param callback function: The callback function
2400            for asynchronous request. (optional)
2401        :param str account_id: The external account number (int) or account ID Guid. (required)
2402        :param str recipient_id: The ID of the recipient being accessed. (required)
2403        :param str template_id: The ID of the template being accessed. (required)
2404        :param TemplateTabs template_tabs:
2405        :return: Tabs
2406                 If the method is called asynchronously,
2407                 returns the request thread.
2408        """
2409        kwargs['_return_http_data_only'] = True
2410        if kwargs.get('callback'):
2411            return self.delete_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
2412        else:
2413            (data) = self.delete_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
2414            return data

Deletes the tabs associated with a recipient in a template. Deletes one or more tabs associated with a recipient in a template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_tabs(account_id, recipient_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

Tabs If the method is called asynchronously, returns the request thread.

def delete_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs)
2416    def delete_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
2417        """
2418        Deletes the tabs associated with a recipient in a template.
2419        Deletes one or more tabs associated with a recipient in a template.
2420        This method makes a synchronous HTTP request by default. To make an
2421        asynchronous HTTP request, please define a `callback` function
2422        to be invoked when receiving the response.
2423        >>> def callback_function(response):
2424        >>>     pprint(response)
2425        >>>
2426        >>> thread = api.delete_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
2427
2428        :param callback function: The callback function
2429            for asynchronous request. (optional)
2430        :param str account_id: The external account number (int) or account ID Guid. (required)
2431        :param str recipient_id: The ID of the recipient being accessed. (required)
2432        :param str template_id: The ID of the template being accessed. (required)
2433        :param TemplateTabs template_tabs:
2434        :return: Tabs
2435                 If the method is called asynchronously,
2436                 returns the request thread.
2437        """
2438
2439        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
2440        all_params.append('callback')
2441        all_params.append('_return_http_data_only')
2442        all_params.append('_preload_content')
2443        all_params.append('_request_timeout')
2444
2445        params = locals()
2446        for key, val in iteritems(params['kwargs']):
2447            if key not in all_params:
2448                raise TypeError(
2449                    "Got an unexpected keyword argument '%s'"
2450                    " to method delete_tabs" % key
2451                )
2452            params[key] = val
2453        del params['kwargs']
2454        # verify the required parameter 'account_id' is set
2455        if ('account_id' not in params) or (params['account_id'] is None):
2456            raise ValueError("Missing the required parameter `account_id` when calling `delete_tabs`")
2457        # verify the required parameter 'recipient_id' is set
2458        if ('recipient_id' not in params) or (params['recipient_id'] is None):
2459            raise ValueError("Missing the required parameter `recipient_id` when calling `delete_tabs`")
2460        # verify the required parameter 'template_id' is set
2461        if ('template_id' not in params) or (params['template_id'] is None):
2462            raise ValueError("Missing the required parameter `template_id` when calling `delete_tabs`")
2463
2464
2465        collection_formats = {}
2466
2467        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
2468        path_params = {}
2469        if 'account_id' in params:
2470            path_params['accountId'] = params['account_id']
2471        if 'recipient_id' in params:
2472            path_params['recipientId'] = params['recipient_id']
2473        if 'template_id' in params:
2474            path_params['templateId'] = params['template_id']
2475
2476        query_params = {}
2477
2478        header_params = {}
2479
2480        form_params = []
2481        local_var_files = {}
2482
2483        body_params = None
2484        if 'template_tabs' in params:
2485            body_params = params['template_tabs']
2486        # HTTP header `Accept`
2487        header_params['Accept'] = self.api_client.\
2488            select_header_accept(['application/json'])
2489
2490        # Authentication setting
2491        auth_settings = []
2492
2493        return self.api_client.call_api(resource_path, 'DELETE',
2494                                        path_params,
2495                                        query_params,
2496                                        header_params,
2497                                        body=body_params,
2498                                        post_params=form_params,
2499                                        files=local_var_files,
2500                                        response_type='Tabs',
2501                                        auth_settings=auth_settings,
2502                                        callback=params.get('callback'),
2503                                        _return_http_data_only=params.get('_return_http_data_only'),
2504                                        _preload_content=params.get('_preload_content', True),
2505                                        _request_timeout=params.get('_request_timeout'),
2506                                        collection_formats=collection_formats)

Deletes the tabs associated with a recipient in a template. Deletes one or more tabs associated with a recipient in a template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

Tabs If the method is called asynchronously, returns the request thread.

def delete_template_document_tabs(self, account_id, document_id, template_id, **kwargs)
2508    def delete_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
2509        """
2510        Deletes tabs from an envelope document
2511        Deletes tabs from the document specified by `documentId` in the template specified by `templateId`. 
2512        This method makes a synchronous HTTP request by default. To make an
2513        asynchronous HTTP request, please define a `callback` function
2514        to be invoked when receiving the response.
2515        >>> def callback_function(response):
2516        >>>     pprint(response)
2517        >>>
2518        >>> thread = api.delete_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
2519
2520        :param callback function: The callback function
2521            for asynchronous request. (optional)
2522        :param str account_id: The external account number (int) or account ID Guid. (required)
2523        :param str document_id: The ID of the document being accessed. (required)
2524        :param str template_id: The ID of the template being accessed. (required)
2525        :param TemplateTabs template_tabs:
2526        :return: Tabs
2527                 If the method is called asynchronously,
2528                 returns the request thread.
2529        """
2530        kwargs['_return_http_data_only'] = True
2531        if kwargs.get('callback'):
2532            return self.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2533        else:
2534            (data) = self.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2535            return data

Deletes tabs from an envelope document Deletes tabs from the document specified by documentId in the template specified by templateId. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

Tabs If the method is called asynchronously, returns the request thread.

def delete_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs)
2537    def delete_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
2538        """
2539        Deletes tabs from an envelope document
2540        Deletes tabs from the document specified by `documentId` in the template specified by `templateId`. 
2541        This method makes a synchronous HTTP request by default. To make an
2542        asynchronous HTTP request, please define a `callback` function
2543        to be invoked when receiving the response.
2544        >>> def callback_function(response):
2545        >>>     pprint(response)
2546        >>>
2547        >>> thread = api.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
2548
2549        :param callback function: The callback function
2550            for asynchronous request. (optional)
2551        :param str account_id: The external account number (int) or account ID Guid. (required)
2552        :param str document_id: The ID of the document being accessed. (required)
2553        :param str template_id: The ID of the template being accessed. (required)
2554        :param TemplateTabs template_tabs:
2555        :return: Tabs
2556                 If the method is called asynchronously,
2557                 returns the request thread.
2558        """
2559
2560        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
2561        all_params.append('callback')
2562        all_params.append('_return_http_data_only')
2563        all_params.append('_preload_content')
2564        all_params.append('_request_timeout')
2565
2566        params = locals()
2567        for key, val in iteritems(params['kwargs']):
2568            if key not in all_params:
2569                raise TypeError(
2570                    "Got an unexpected keyword argument '%s'"
2571                    " to method delete_template_document_tabs" % key
2572                )
2573            params[key] = val
2574        del params['kwargs']
2575        # verify the required parameter 'account_id' is set
2576        if ('account_id' not in params) or (params['account_id'] is None):
2577            raise ValueError("Missing the required parameter `account_id` when calling `delete_template_document_tabs`")
2578        # verify the required parameter 'document_id' is set
2579        if ('document_id' not in params) or (params['document_id'] is None):
2580            raise ValueError("Missing the required parameter `document_id` when calling `delete_template_document_tabs`")
2581        # verify the required parameter 'template_id' is set
2582        if ('template_id' not in params) or (params['template_id'] is None):
2583            raise ValueError("Missing the required parameter `template_id` when calling `delete_template_document_tabs`")
2584
2585
2586        collection_formats = {}
2587
2588        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
2589        path_params = {}
2590        if 'account_id' in params:
2591            path_params['accountId'] = params['account_id']
2592        if 'document_id' in params:
2593            path_params['documentId'] = params['document_id']
2594        if 'template_id' in params:
2595            path_params['templateId'] = params['template_id']
2596
2597        query_params = {}
2598
2599        header_params = {}
2600
2601        form_params = []
2602        local_var_files = {}
2603
2604        body_params = None
2605        if 'template_tabs' in params:
2606            body_params = params['template_tabs']
2607        # HTTP header `Accept`
2608        header_params['Accept'] = self.api_client.\
2609            select_header_accept(['application/json'])
2610
2611        # Authentication setting
2612        auth_settings = []
2613
2614        return self.api_client.call_api(resource_path, 'DELETE',
2615                                        path_params,
2616                                        query_params,
2617                                        header_params,
2618                                        body=body_params,
2619                                        post_params=form_params,
2620                                        files=local_var_files,
2621                                        response_type='Tabs',
2622                                        auth_settings=auth_settings,
2623                                        callback=params.get('callback'),
2624                                        _return_http_data_only=params.get('_return_http_data_only'),
2625                                        _preload_content=params.get('_preload_content', True),
2626                                        _request_timeout=params.get('_request_timeout'),
2627                                        collection_formats=collection_formats)

Deletes tabs from an envelope document Deletes tabs from the document specified by documentId in the template specified by templateId. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

Tabs If the method is called asynchronously, returns the request thread.

def get(self, account_id, template_id, **kwargs)
2629    def get(self, account_id, template_id, **kwargs):
2630        """
2631        Gets a list of templates for a specified account.
2632        Retrieves the definition of the specified template.
2633        This method makes a synchronous HTTP request by default. To make an
2634        asynchronous HTTP request, please define a `callback` function
2635        to be invoked when receiving the response.
2636        >>> def callback_function(response):
2637        >>>     pprint(response)
2638        >>>
2639        >>> thread = api.get(account_id, template_id, callback=callback_function)
2640
2641        :param callback function: The callback function
2642            for asynchronous request. (optional)
2643        :param str account_id: The external account number (int) or account ID Guid. (required)
2644        :param str template_id: The ID of the template being accessed. (required)
2645        :param str include:
2646        :return: EnvelopeTemplate
2647                 If the method is called asynchronously,
2648                 returns the request thread.
2649        """
2650        kwargs['_return_http_data_only'] = True
2651        if kwargs.get('callback'):
2652            return self.get_with_http_info(account_id, template_id, **kwargs)
2653        else:
2654            (data) = self.get_with_http_info(account_id, template_id, **kwargs)
2655            return data

Gets a list of templates for a specified account. Retrieves the definition of the specified template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str include:
Returns

EnvelopeTemplate If the method is called asynchronously, returns the request thread.

def get_with_http_info(self, account_id, template_id, **kwargs)
2657    def get_with_http_info(self, account_id, template_id, **kwargs):
2658        """
2659        Gets a list of templates for a specified account.
2660        Retrieves the definition of the specified template.
2661        This method makes a synchronous HTTP request by default. To make an
2662        asynchronous HTTP request, please define a `callback` function
2663        to be invoked when receiving the response.
2664        >>> def callback_function(response):
2665        >>>     pprint(response)
2666        >>>
2667        >>> thread = api.get_with_http_info(account_id, template_id, callback=callback_function)
2668
2669        :param callback function: The callback function
2670            for asynchronous request. (optional)
2671        :param str account_id: The external account number (int) or account ID Guid. (required)
2672        :param str template_id: The ID of the template being accessed. (required)
2673        :param str include:
2674        :return: EnvelopeTemplate
2675                 If the method is called asynchronously,
2676                 returns the request thread.
2677        """
2678
2679        all_params = ['account_id', 'template_id', 'include']
2680        all_params.append('callback')
2681        all_params.append('_return_http_data_only')
2682        all_params.append('_preload_content')
2683        all_params.append('_request_timeout')
2684
2685        params = locals()
2686        for key, val in iteritems(params['kwargs']):
2687            if key not in all_params:
2688                raise TypeError(
2689                    "Got an unexpected keyword argument '%s'"
2690                    " to method get" % key
2691                )
2692            params[key] = val
2693        del params['kwargs']
2694        # verify the required parameter 'account_id' is set
2695        if ('account_id' not in params) or (params['account_id'] is None):
2696            raise ValueError("Missing the required parameter `account_id` when calling `get`")
2697        # verify the required parameter 'template_id' is set
2698        if ('template_id' not in params) or (params['template_id'] is None):
2699            raise ValueError("Missing the required parameter `template_id` when calling `get`")
2700
2701
2702        collection_formats = {}
2703
2704        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json')
2705        path_params = {}
2706        if 'account_id' in params:
2707            path_params['accountId'] = params['account_id']
2708        if 'template_id' in params:
2709            path_params['templateId'] = params['template_id']
2710
2711        query_params = {}
2712        if 'include' in params:
2713            query_params['include'] = params['include']
2714
2715        header_params = {}
2716
2717        form_params = []
2718        local_var_files = {}
2719
2720        body_params = None
2721        # HTTP header `Accept`
2722        header_params['Accept'] = self.api_client.\
2723            select_header_accept(['application/json'])
2724
2725        # Authentication setting
2726        auth_settings = []
2727
2728        return self.api_client.call_api(resource_path, 'GET',
2729                                        path_params,
2730                                        query_params,
2731                                        header_params,
2732                                        body=body_params,
2733                                        post_params=form_params,
2734                                        files=local_var_files,
2735                                        response_type='EnvelopeTemplate',
2736                                        auth_settings=auth_settings,
2737                                        callback=params.get('callback'),
2738                                        _return_http_data_only=params.get('_return_http_data_only'),
2739                                        _preload_content=params.get('_preload_content', True),
2740                                        _request_timeout=params.get('_request_timeout'),
2741                                        collection_formats=collection_formats)

Gets a list of templates for a specified account. Retrieves the definition of the specified template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str include:
Returns

EnvelopeTemplate If the method is called asynchronously, returns the request thread.

def get_document(self, account_id, document_id, template_id, **kwargs)
2743    def get_document(self, account_id, document_id, template_id, **kwargs):
2744        """
2745        Gets PDF documents from a template.
2746        Retrieves one or more PDF documents from the specified template.  You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf.
2747        This method makes a synchronous HTTP request by default. To make an
2748        asynchronous HTTP request, please define a `callback` function
2749        to be invoked when receiving the response.
2750        >>> def callback_function(response):
2751        >>>     pprint(response)
2752        >>>
2753        >>> thread = api.get_document(account_id, document_id, template_id, callback=callback_function)
2754
2755        :param callback function: The callback function
2756            for asynchronous request. (optional)
2757        :param str account_id: The external account number (int) or account ID Guid. (required)
2758        :param str document_id: The ID of the document being accessed. (required)
2759        :param str template_id: The ID of the template being accessed. (required)
2760        :param str encrypt:
2761        :param str show_changes:
2762        :return: file
2763                 If the method is called asynchronously,
2764                 returns the request thread.
2765        """
2766        kwargs['_return_http_data_only'] = True
2767        if kwargs.get('callback'):
2768            return self.get_document_with_http_info(account_id, document_id, template_id, **kwargs)
2769        else:
2770            (data) = self.get_document_with_http_info(account_id, document_id, template_id, **kwargs)
2771            return data

Gets PDF documents from a template. Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify combined to retrieve all documents in the template as one pdf. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_document(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str encrypt:
  • str show_changes:
Returns

file If the method is called asynchronously, returns the request thread.

def get_document_with_http_info(self, account_id, document_id, template_id, **kwargs)
2773    def get_document_with_http_info(self, account_id, document_id, template_id, **kwargs):
2774        """
2775        Gets PDF documents from a template.
2776        Retrieves one or more PDF documents from the specified template.  You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf.
2777        This method makes a synchronous HTTP request by default. To make an
2778        asynchronous HTTP request, please define a `callback` function
2779        to be invoked when receiving the response.
2780        >>> def callback_function(response):
2781        >>>     pprint(response)
2782        >>>
2783        >>> thread = api.get_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
2784
2785        :param callback function: The callback function
2786            for asynchronous request. (optional)
2787        :param str account_id: The external account number (int) or account ID Guid. (required)
2788        :param str document_id: The ID of the document being accessed. (required)
2789        :param str template_id: The ID of the template being accessed. (required)
2790        :param str encrypt:
2791        :param str show_changes:
2792        :return: file
2793                 If the method is called asynchronously,
2794                 returns the request thread.
2795        """
2796
2797        all_params = ['account_id', 'document_id', 'template_id', 'encrypt', 'show_changes']
2798        all_params.append('callback')
2799        all_params.append('_return_http_data_only')
2800        all_params.append('_preload_content')
2801        all_params.append('_request_timeout')
2802
2803        params = locals()
2804        for key, val in iteritems(params['kwargs']):
2805            if key not in all_params:
2806                raise TypeError(
2807                    "Got an unexpected keyword argument '%s'"
2808                    " to method get_document" % key
2809                )
2810            params[key] = val
2811        del params['kwargs']
2812        # verify the required parameter 'account_id' is set
2813        if ('account_id' not in params) or (params['account_id'] is None):
2814            raise ValueError("Missing the required parameter `account_id` when calling `get_document`")
2815        # verify the required parameter 'document_id' is set
2816        if ('document_id' not in params) or (params['document_id'] is None):
2817            raise ValueError("Missing the required parameter `document_id` when calling `get_document`")
2818        # verify the required parameter 'template_id' is set
2819        if ('template_id' not in params) or (params['template_id'] is None):
2820            raise ValueError("Missing the required parameter `template_id` when calling `get_document`")
2821
2822
2823        collection_formats = {}
2824
2825        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
2826        path_params = {}
2827        if 'account_id' in params:
2828            path_params['accountId'] = params['account_id']
2829        if 'document_id' in params:
2830            path_params['documentId'] = params['document_id']
2831        if 'template_id' in params:
2832            path_params['templateId'] = params['template_id']
2833
2834        query_params = {}
2835        if 'encrypt' in params:
2836            query_params['encrypt'] = params['encrypt']
2837        if 'show_changes' in params:
2838            query_params['show_changes'] = params['show_changes']
2839
2840        header_params = {}
2841
2842        form_params = []
2843        local_var_files = {}
2844
2845        body_params = None
2846        # HTTP header `Accept`
2847        header_params['Accept'] = self.api_client.\
2848            select_header_accept(['application/pdf'])
2849
2850        # Authentication setting
2851        auth_settings = []
2852
2853        return self.api_client.call_api(resource_path, 'GET',
2854                                        path_params,
2855                                        query_params,
2856                                        header_params,
2857                                        body=body_params,
2858                                        post_params=form_params,
2859                                        files=local_var_files,
2860                                        response_type='file',
2861                                        auth_settings=auth_settings,
2862                                        callback=params.get('callback'),
2863                                        _return_http_data_only=params.get('_return_http_data_only'),
2864                                        _preload_content=params.get('_preload_content', True),
2865                                        _request_timeout=params.get('_request_timeout'),
2866                                        collection_formats=collection_formats)

Gets PDF documents from a template. Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify combined to retrieve all documents in the template as one pdf. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str encrypt:
  • str show_changes:
Returns

file If the method is called asynchronously, returns the request thread.

def get_document_page_image(self, account_id, document_id, page_number, template_id, **kwargs)
2868    def get_document_page_image(self, account_id, document_id, page_number, template_id, **kwargs):
2869        """
2870        Gets a page image from a template for display.
2871        Retrieves a page image for display from the specified template.
2872        This method makes a synchronous HTTP request by default. To make an
2873        asynchronous HTTP request, please define a `callback` function
2874        to be invoked when receiving the response.
2875        >>> def callback_function(response):
2876        >>>     pprint(response)
2877        >>>
2878        >>> thread = api.get_document_page_image(account_id, document_id, page_number, template_id, callback=callback_function)
2879
2880        :param callback function: The callback function
2881            for asynchronous request. (optional)
2882        :param str account_id: The external account number (int) or account ID Guid. (required)
2883        :param str document_id: The ID of the document being accessed. (required)
2884        :param str page_number: The page number being accessed. (required)
2885        :param str template_id: The ID of the template being accessed. (required)
2886        :param str dpi:
2887        :param str max_height:
2888        :param str max_width:
2889        :param str show_changes:
2890        :return: file
2891                 If the method is called asynchronously,
2892                 returns the request thread.
2893        """
2894        kwargs['_return_http_data_only'] = True
2895        if kwargs.get('callback'):
2896            return self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2897        else:
2898            (data) = self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2899            return data

Gets a page image from a template for display. Retrieves a page image for display from the specified template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_document_page_image(account_id, document_id, page_number, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str page_number: The page number being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str dpi:
  • str max_height:
  • str max_width:
  • str show_changes:
Returns

file If the method is called asynchronously, returns the request thread.

def get_document_page_image_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs)
2901    def get_document_page_image_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
2902        """
2903        Gets a page image from a template for display.
2904        Retrieves a page image for display from the specified template.
2905        This method makes a synchronous HTTP request by default. To make an
2906        asynchronous HTTP request, please define a `callback` function
2907        to be invoked when receiving the response.
2908        >>> def callback_function(response):
2909        >>>     pprint(response)
2910        >>>
2911        >>> thread = api.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
2912
2913        :param callback function: The callback function
2914            for asynchronous request. (optional)
2915        :param str account_id: The external account number (int) or account ID Guid. (required)
2916        :param str document_id: The ID of the document being accessed. (required)
2917        :param str page_number: The page number being accessed. (required)
2918        :param str template_id: The ID of the template being accessed. (required)
2919        :param str dpi:
2920        :param str max_height:
2921        :param str max_width:
2922        :param str show_changes:
2923        :return: file
2924                 If the method is called asynchronously,
2925                 returns the request thread.
2926        """
2927
2928        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'dpi', 'max_height', 'max_width', 'show_changes']
2929        all_params.append('callback')
2930        all_params.append('_return_http_data_only')
2931        all_params.append('_preload_content')
2932        all_params.append('_request_timeout')
2933
2934        params = locals()
2935        for key, val in iteritems(params['kwargs']):
2936            if key not in all_params:
2937                raise TypeError(
2938                    "Got an unexpected keyword argument '%s'"
2939                    " to method get_document_page_image" % key
2940                )
2941            params[key] = val
2942        del params['kwargs']
2943        # verify the required parameter 'account_id' is set
2944        if ('account_id' not in params) or (params['account_id'] is None):
2945            raise ValueError("Missing the required parameter `account_id` when calling `get_document_page_image`")
2946        # verify the required parameter 'document_id' is set
2947        if ('document_id' not in params) or (params['document_id'] is None):
2948            raise ValueError("Missing the required parameter `document_id` when calling `get_document_page_image`")
2949        # verify the required parameter 'page_number' is set
2950        if ('page_number' not in params) or (params['page_number'] is None):
2951            raise ValueError("Missing the required parameter `page_number` when calling `get_document_page_image`")
2952        # verify the required parameter 'template_id' is set
2953        if ('template_id' not in params) or (params['template_id'] is None):
2954            raise ValueError("Missing the required parameter `template_id` when calling `get_document_page_image`")
2955
2956
2957        collection_formats = {}
2958
2959        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
2960        path_params = {}
2961        if 'account_id' in params:
2962            path_params['accountId'] = params['account_id']
2963        if 'document_id' in params:
2964            path_params['documentId'] = params['document_id']
2965        if 'page_number' in params:
2966            path_params['pageNumber'] = params['page_number']
2967        if 'template_id' in params:
2968            path_params['templateId'] = params['template_id']
2969
2970        query_params = {}
2971        if 'dpi' in params:
2972            query_params['dpi'] = params['dpi']
2973        if 'max_height' in params:
2974            query_params['max_height'] = params['max_height']
2975        if 'max_width' in params:
2976            query_params['max_width'] = params['max_width']
2977        if 'show_changes' in params:
2978            query_params['show_changes'] = params['show_changes']
2979
2980        header_params = {}
2981
2982        form_params = []
2983        local_var_files = {}
2984
2985        body_params = None
2986        # HTTP header `Accept`
2987        header_params['Accept'] = self.api_client.\
2988            select_header_accept(['image/png'])
2989
2990        # Authentication setting
2991        auth_settings = []
2992
2993        return self.api_client.call_api(resource_path, 'GET',
2994                                        path_params,
2995                                        query_params,
2996                                        header_params,
2997                                        body=body_params,
2998                                        post_params=form_params,
2999                                        files=local_var_files,
3000                                        response_type='file',
3001                                        auth_settings=auth_settings,
3002                                        callback=params.get('callback'),
3003                                        _return_http_data_only=params.get('_return_http_data_only'),
3004                                        _preload_content=params.get('_preload_content', True),
3005                                        _request_timeout=params.get('_request_timeout'),
3006                                        collection_formats=collection_formats)

Gets a page image from a template for display. Retrieves a page image for display from the specified template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str page_number: The page number being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str dpi:
  • str max_height:
  • str max_width:
  • str show_changes:
Returns

file If the method is called asynchronously, returns the request thread.

def get_document_tabs(self, account_id, document_id, template_id, **kwargs)
3008    def get_document_tabs(self, account_id, document_id, template_id, **kwargs):
3009        """
3010        Returns tabs on the document.
3011        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
3012        This method makes a synchronous HTTP request by default. To make an
3013        asynchronous HTTP request, please define a `callback` function
3014        to be invoked when receiving the response.
3015        >>> def callback_function(response):
3016        >>>     pprint(response)
3017        >>>
3018        >>> thread = api.get_document_tabs(account_id, document_id, template_id, callback=callback_function)
3019
3020        :param callback function: The callback function
3021            for asynchronous request. (optional)
3022        :param str account_id: The external account number (int) or account ID Guid. (required)
3023        :param str document_id: The ID of the document being accessed. (required)
3024        :param str template_id: The ID of the template being accessed. (required)
3025        :param str page_numbers:
3026        :return: Tabs
3027                 If the method is called asynchronously,
3028                 returns the request thread.
3029        """
3030        kwargs['_return_http_data_only'] = True
3031        if kwargs.get('callback'):
3032            return self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
3033        else:
3034            (data) = self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
3035            return data

Returns tabs on the document. Returns the tabs on the document specified by documentId in the template specified by templateId.
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_document_tabs(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str page_numbers:
Returns

Tabs If the method is called asynchronously, returns the request thread.

def get_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs)
3037    def get_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
3038        """
3039        Returns tabs on the document.
3040        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
3041        This method makes a synchronous HTTP request by default. To make an
3042        asynchronous HTTP request, please define a `callback` function
3043        to be invoked when receiving the response.
3044        >>> def callback_function(response):
3045        >>>     pprint(response)
3046        >>>
3047        >>> thread = api.get_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
3048
3049        :param callback function: The callback function
3050            for asynchronous request. (optional)
3051        :param str account_id: The external account number (int) or account ID Guid. (required)
3052        :param str document_id: The ID of the document being accessed. (required)
3053        :param str template_id: The ID of the template being accessed. (required)
3054        :param str page_numbers:
3055        :return: Tabs
3056                 If the method is called asynchronously,
3057                 returns the request thread.
3058        """
3059
3060        all_params = ['account_id', 'document_id', 'template_id', 'page_numbers']
3061        all_params.append('callback')
3062        all_params.append('_return_http_data_only')
3063        all_params.append('_preload_content')
3064        all_params.append('_request_timeout')
3065
3066        params = locals()
3067        for key, val in iteritems(params['kwargs']):
3068            if key not in all_params:
3069                raise TypeError(
3070                    "Got an unexpected keyword argument '%s'"
3071                    " to method get_document_tabs" % key
3072                )
3073            params[key] = val
3074        del params['kwargs']
3075        # verify the required parameter 'account_id' is set
3076        if ('account_id' not in params) or (params['account_id'] is None):
3077            raise ValueError("Missing the required parameter `account_id` when calling `get_document_tabs`")
3078        # verify the required parameter 'document_id' is set
3079        if ('document_id' not in params) or (params['document_id'] is None):
3080            raise ValueError("Missing the required parameter `document_id` when calling `get_document_tabs`")
3081        # verify the required parameter 'template_id' is set
3082        if ('template_id' not in params) or (params['template_id'] is None):
3083            raise ValueError("Missing the required parameter `template_id` when calling `get_document_tabs`")
3084
3085
3086        collection_formats = {}
3087
3088        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
3089        path_params = {}
3090        if 'account_id' in params:
3091            path_params['accountId'] = params['account_id']
3092        if 'document_id' in params:
3093            path_params['documentId'] = params['document_id']
3094        if 'template_id' in params:
3095            path_params['templateId'] = params['template_id']
3096
3097        query_params = {}
3098        if 'page_numbers' in params:
3099            query_params['page_numbers'] = params['page_numbers']
3100
3101        header_params = {}
3102
3103        form_params = []
3104        local_var_files = {}
3105
3106        body_params = None
3107        # HTTP header `Accept`
3108        header_params['Accept'] = self.api_client.\
3109            select_header_accept(['application/json'])
3110
3111        # Authentication setting
3112        auth_settings = []
3113
3114        return self.api_client.call_api(resource_path, 'GET',
3115                                        path_params,
3116                                        query_params,
3117                                        header_params,
3118                                        body=body_params,
3119                                        post_params=form_params,
3120                                        files=local_var_files,
3121                                        response_type='Tabs',
3122                                        auth_settings=auth_settings,
3123                                        callback=params.get('callback'),
3124                                        _return_http_data_only=params.get('_return_http_data_only'),
3125                                        _preload_content=params.get('_preload_content', True),
3126                                        _request_timeout=params.get('_request_timeout'),
3127                                        collection_formats=collection_formats)

Returns tabs on the document. Returns the tabs on the document specified by documentId in the template specified by templateId.
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str page_numbers:
Returns

Tabs If the method is called asynchronously, returns the request thread.

def get_lock(self, account_id, template_id, **kwargs)
3129    def get_lock(self, account_id, template_id, **kwargs):
3130        """
3131        Gets template lock information.
3132        Retrieves general information about the template lock.  If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header  field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header.
3133        This method makes a synchronous HTTP request by default. To make an
3134        asynchronous HTTP request, please define a `callback` function
3135        to be invoked when receiving the response.
3136        >>> def callback_function(response):
3137        >>>     pprint(response)
3138        >>>
3139        >>> thread = api.get_lock(account_id, template_id, callback=callback_function)
3140
3141        :param callback function: The callback function
3142            for asynchronous request. (optional)
3143        :param str account_id: The external account number (int) or account ID Guid. (required)
3144        :param str template_id: The ID of the template being accessed. (required)
3145        :return: LockInformation
3146                 If the method is called asynchronously,
3147                 returns the request thread.
3148        """
3149        kwargs['_return_http_data_only'] = True
3150        if kwargs.get('callback'):
3151            return self.get_lock_with_http_info(account_id, template_id, **kwargs)
3152        else:
3153            (data) = self.get_lock_with_http_info(account_id, template_id, **kwargs)
3154            return data

Gets template lock information. Retrieves general information about the template lock. If the call is made by the user who has the lock and the request has the same integrator key as original, then the X-DocuSign-Edit header field and additional lock information is included in the response. This allows users to recover a lost editing session token and the X-DocuSign-Edit header. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_lock(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

LockInformation If the method is called asynchronously, returns the request thread.

def get_lock_with_http_info(self, account_id, template_id, **kwargs)
3156    def get_lock_with_http_info(self, account_id, template_id, **kwargs):
3157        """
3158        Gets template lock information.
3159        Retrieves general information about the template lock.  If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header  field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header.
3160        This method makes a synchronous HTTP request by default. To make an
3161        asynchronous HTTP request, please define a `callback` function
3162        to be invoked when receiving the response.
3163        >>> def callback_function(response):
3164        >>>     pprint(response)
3165        >>>
3166        >>> thread = api.get_lock_with_http_info(account_id, template_id, callback=callback_function)
3167
3168        :param callback function: The callback function
3169            for asynchronous request. (optional)
3170        :param str account_id: The external account number (int) or account ID Guid. (required)
3171        :param str template_id: The ID of the template being accessed. (required)
3172        :return: LockInformation
3173                 If the method is called asynchronously,
3174                 returns the request thread.
3175        """
3176
3177        all_params = ['account_id', 'template_id']
3178        all_params.append('callback')
3179        all_params.append('_return_http_data_only')
3180        all_params.append('_preload_content')
3181        all_params.append('_request_timeout')
3182
3183        params = locals()
3184        for key, val in iteritems(params['kwargs']):
3185            if key not in all_params:
3186                raise TypeError(
3187                    "Got an unexpected keyword argument '%s'"
3188                    " to method get_lock" % key
3189                )
3190            params[key] = val
3191        del params['kwargs']
3192        # verify the required parameter 'account_id' is set
3193        if ('account_id' not in params) or (params['account_id'] is None):
3194            raise ValueError("Missing the required parameter `account_id` when calling `get_lock`")
3195        # verify the required parameter 'template_id' is set
3196        if ('template_id' not in params) or (params['template_id'] is None):
3197            raise ValueError("Missing the required parameter `template_id` when calling `get_lock`")
3198
3199
3200        collection_formats = {}
3201
3202        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
3203        path_params = {}
3204        if 'account_id' in params:
3205            path_params['accountId'] = params['account_id']
3206        if 'template_id' in params:
3207            path_params['templateId'] = params['template_id']
3208
3209        query_params = {}
3210
3211        header_params = {}
3212
3213        form_params = []
3214        local_var_files = {}
3215
3216        body_params = None
3217        # HTTP header `Accept`
3218        header_params['Accept'] = self.api_client.\
3219            select_header_accept(['application/json'])
3220
3221        # Authentication setting
3222        auth_settings = []
3223
3224        return self.api_client.call_api(resource_path, 'GET',
3225                                        path_params,
3226                                        query_params,
3227                                        header_params,
3228                                        body=body_params,
3229                                        post_params=form_params,
3230                                        files=local_var_files,
3231                                        response_type='LockInformation',
3232                                        auth_settings=auth_settings,
3233                                        callback=params.get('callback'),
3234                                        _return_http_data_only=params.get('_return_http_data_only'),
3235                                        _preload_content=params.get('_preload_content', True),
3236                                        _request_timeout=params.get('_request_timeout'),
3237                                        collection_formats=collection_formats)

Gets template lock information. Retrieves general information about the template lock. If the call is made by the user who has the lock and the request has the same integrator key as original, then the X-DocuSign-Edit header field and additional lock information is included in the response. This allows users to recover a lost editing session token and the X-DocuSign-Edit header. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_lock_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

LockInformation If the method is called asynchronously, returns the request thread.

def get_notification_settings(self, account_id, template_id, **kwargs)
3239    def get_notification_settings(self, account_id, template_id, **kwargs):
3240        """
3241        Gets template notification information.
3242        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3243        This method makes a synchronous HTTP request by default. To make an
3244        asynchronous HTTP request, please define a `callback` function
3245        to be invoked when receiving the response.
3246        >>> def callback_function(response):
3247        >>>     pprint(response)
3248        >>>
3249        >>> thread = api.get_notification_settings(account_id, template_id, callback=callback_function)
3250
3251        :param callback function: The callback function
3252            for asynchronous request. (optional)
3253        :param str account_id: The external account number (int) or account ID Guid. (required)
3254        :param str template_id: The ID of the template being accessed. (required)
3255        :return: Notification
3256                 If the method is called asynchronously,
3257                 returns the request thread.
3258        """
3259        kwargs['_return_http_data_only'] = True
3260        if kwargs.get('callback'):
3261            return self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3262        else:
3263            (data) = self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3264            return data

Gets template notification information. Retrieves the envelope notification, reminders and expirations, information for an existing template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_notification_settings(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

Notification If the method is called asynchronously, returns the request thread.

def get_notification_settings_with_http_info(self, account_id, template_id, **kwargs)
3266    def get_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
3267        """
3268        Gets template notification information.
3269        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3270        This method makes a synchronous HTTP request by default. To make an
3271        asynchronous HTTP request, please define a `callback` function
3272        to be invoked when receiving the response.
3273        >>> def callback_function(response):
3274        >>>     pprint(response)
3275        >>>
3276        >>> thread = api.get_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
3277
3278        :param callback function: The callback function
3279            for asynchronous request. (optional)
3280        :param str account_id: The external account number (int) or account ID Guid. (required)
3281        :param str template_id: The ID of the template being accessed. (required)
3282        :return: Notification
3283                 If the method is called asynchronously,
3284                 returns the request thread.
3285        """
3286
3287        all_params = ['account_id', 'template_id']
3288        all_params.append('callback')
3289        all_params.append('_return_http_data_only')
3290        all_params.append('_preload_content')
3291        all_params.append('_request_timeout')
3292
3293        params = locals()
3294        for key, val in iteritems(params['kwargs']):
3295            if key not in all_params:
3296                raise TypeError(
3297                    "Got an unexpected keyword argument '%s'"
3298                    " to method get_notification_settings" % key
3299                )
3300            params[key] = val
3301        del params['kwargs']
3302        # verify the required parameter 'account_id' is set
3303        if ('account_id' not in params) or (params['account_id'] is None):
3304            raise ValueError("Missing the required parameter `account_id` when calling `get_notification_settings`")
3305        # verify the required parameter 'template_id' is set
3306        if ('template_id' not in params) or (params['template_id'] is None):
3307            raise ValueError("Missing the required parameter `template_id` when calling `get_notification_settings`")
3308
3309
3310        collection_formats = {}
3311
3312        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
3313        path_params = {}
3314        if 'account_id' in params:
3315            path_params['accountId'] = params['account_id']
3316        if 'template_id' in params:
3317            path_params['templateId'] = params['template_id']
3318
3319        query_params = {}
3320
3321        header_params = {}
3322
3323        form_params = []
3324        local_var_files = {}
3325
3326        body_params = None
3327        # HTTP header `Accept`
3328        header_params['Accept'] = self.api_client.\
3329            select_header_accept(['application/json'])
3330
3331        # Authentication setting
3332        auth_settings = []
3333
3334        return self.api_client.call_api(resource_path, 'GET',
3335                                        path_params,
3336                                        query_params,
3337                                        header_params,
3338                                        body=body_params,
3339                                        post_params=form_params,
3340                                        files=local_var_files,
3341                                        response_type='Notification',
3342                                        auth_settings=auth_settings,
3343                                        callback=params.get('callback'),
3344                                        _return_http_data_only=params.get('_return_http_data_only'),
3345                                        _preload_content=params.get('_preload_content', True),
3346                                        _request_timeout=params.get('_request_timeout'),
3347                                        collection_formats=collection_formats)

Gets template notification information. Retrieves the envelope notification, reminders and expirations, information for an existing template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

Notification If the method is called asynchronously, returns the request thread.

def get_page_tabs(self, account_id, document_id, page_number, template_id, **kwargs)
3349    def get_page_tabs(self, account_id, document_id, page_number, template_id, **kwargs):
3350        """
3351        Returns tabs on the specified page.
3352        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3353        This method makes a synchronous HTTP request by default. To make an
3354        asynchronous HTTP request, please define a `callback` function
3355        to be invoked when receiving the response.
3356        >>> def callback_function(response):
3357        >>>     pprint(response)
3358        >>>
3359        >>> thread = api.get_page_tabs(account_id, document_id, page_number, template_id, callback=callback_function)
3360
3361        :param callback function: The callback function
3362            for asynchronous request. (optional)
3363        :param str account_id: The external account number (int) or account ID Guid. (required)
3364        :param str document_id: The ID of the document being accessed. (required)
3365        :param str page_number: The page number being accessed. (required)
3366        :param str template_id: The ID of the template being accessed. (required)
3367        :return: Tabs
3368                 If the method is called asynchronously,
3369                 returns the request thread.
3370        """
3371        kwargs['_return_http_data_only'] = True
3372        if kwargs.get('callback'):
3373            return self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3374        else:
3375            (data) = self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3376            return data

Returns tabs on the specified page. Returns the tabs from the page specified by pageNumber of the document specified by documentId in the template specified by templateId. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_page_tabs(account_id, document_id, page_number, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str page_number: The page number being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

Tabs If the method is called asynchronously, returns the request thread.

def get_page_tabs_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs)
3378    def get_page_tabs_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
3379        """
3380        Returns tabs on the specified page.
3381        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3382        This method makes a synchronous HTTP request by default. To make an
3383        asynchronous HTTP request, please define a `callback` function
3384        to be invoked when receiving the response.
3385        >>> def callback_function(response):
3386        >>>     pprint(response)
3387        >>>
3388        >>> thread = api.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
3389
3390        :param callback function: The callback function
3391            for asynchronous request. (optional)
3392        :param str account_id: The external account number (int) or account ID Guid. (required)
3393        :param str document_id: The ID of the document being accessed. (required)
3394        :param str page_number: The page number being accessed. (required)
3395        :param str template_id: The ID of the template being accessed. (required)
3396        :return: Tabs
3397                 If the method is called asynchronously,
3398                 returns the request thread.
3399        """
3400
3401        all_params = ['account_id', 'document_id', 'page_number', 'template_id']
3402        all_params.append('callback')
3403        all_params.append('_return_http_data_only')
3404        all_params.append('_preload_content')
3405        all_params.append('_request_timeout')
3406
3407        params = locals()
3408        for key, val in iteritems(params['kwargs']):
3409            if key not in all_params:
3410                raise TypeError(
3411                    "Got an unexpected keyword argument '%s'"
3412                    " to method get_page_tabs" % key
3413                )
3414            params[key] = val
3415        del params['kwargs']
3416        # verify the required parameter 'account_id' is set
3417        if ('account_id' not in params) or (params['account_id'] is None):
3418            raise ValueError("Missing the required parameter `account_id` when calling `get_page_tabs`")
3419        # verify the required parameter 'document_id' is set
3420        if ('document_id' not in params) or (params['document_id'] is None):
3421            raise ValueError("Missing the required parameter `document_id` when calling `get_page_tabs`")
3422        # verify the required parameter 'page_number' is set
3423        if ('page_number' not in params) or (params['page_number'] is None):
3424            raise ValueError("Missing the required parameter `page_number` when calling `get_page_tabs`")
3425        # verify the required parameter 'template_id' is set
3426        if ('template_id' not in params) or (params['template_id'] is None):
3427            raise ValueError("Missing the required parameter `template_id` when calling `get_page_tabs`")
3428
3429
3430        collection_formats = {}
3431
3432        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/tabs'.replace('{format}', 'json')
3433        path_params = {}
3434        if 'account_id' in params:
3435            path_params['accountId'] = params['account_id']
3436        if 'document_id' in params:
3437            path_params['documentId'] = params['document_id']
3438        if 'page_number' in params:
3439            path_params['pageNumber'] = params['page_number']
3440        if 'template_id' in params:
3441            path_params['templateId'] = params['template_id']
3442
3443        query_params = {}
3444
3445        header_params = {}
3446
3447        form_params = []
3448        local_var_files = {}
3449
3450        body_params = None
3451        # HTTP header `Accept`
3452        header_params['Accept'] = self.api_client.\
3453            select_header_accept(['application/json'])
3454
3455        # Authentication setting
3456        auth_settings = []
3457
3458        return self.api_client.call_api(resource_path, 'GET',
3459                                        path_params,
3460                                        query_params,
3461                                        header_params,
3462                                        body=body_params,
3463                                        post_params=form_params,
3464                                        files=local_var_files,
3465                                        response_type='Tabs',
3466                                        auth_settings=auth_settings,
3467                                        callback=params.get('callback'),
3468                                        _return_http_data_only=params.get('_return_http_data_only'),
3469                                        _preload_content=params.get('_preload_content', True),
3470                                        _request_timeout=params.get('_request_timeout'),
3471                                        collection_formats=collection_formats)

Returns tabs on the specified page. Returns the tabs from the page specified by pageNumber of the document specified by documentId in the template specified by templateId. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str page_number: The page number being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

Tabs If the method is called asynchronously, returns the request thread.

def get_pages(self, account_id, document_id, template_id, **kwargs)
3473    def get_pages(self, account_id, document_id, template_id, **kwargs):
3474        """
3475        Returns document page image(s) based on input.
3476        Returns images of the pages in a template document for display based on the parameters that you specify.
3477        This method makes a synchronous HTTP request by default. To make an
3478        asynchronous HTTP request, please define a `callback` function
3479        to be invoked when receiving the response.
3480        >>> def callback_function(response):
3481        >>>     pprint(response)
3482        >>>
3483        >>> thread = api.get_pages(account_id, document_id, template_id, callback=callback_function)
3484
3485        :param callback function: The callback function
3486            for asynchronous request. (optional)
3487        :param str account_id: The external account number (int) or account ID Guid. (required)
3488        :param str document_id: The ID of the document being accessed. (required)
3489        :param str template_id: The ID of the template being accessed. (required)
3490        :param str count:
3491        :param str dpi:
3492        :param str max_height:
3493        :param str max_width:
3494        :param str nocache:
3495        :param str show_changes:
3496        :param str start_position:
3497        :return: PageImages
3498                 If the method is called asynchronously,
3499                 returns the request thread.
3500        """
3501        kwargs['_return_http_data_only'] = True
3502        if kwargs.get('callback'):
3503            return self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3504        else:
3505            (data) = self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3506            return data

Returns document page image(s) based on input. Returns images of the pages in a template document for display based on the parameters that you specify. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_pages(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str count:
  • str dpi:
  • str max_height:
  • str max_width:
  • str nocache:
  • str show_changes:
  • str start_position:
Returns

PageImages If the method is called asynchronously, returns the request thread.

def get_pages_with_http_info(self, account_id, document_id, template_id, **kwargs)
3508    def get_pages_with_http_info(self, account_id, document_id, template_id, **kwargs):
3509        """
3510        Returns document page image(s) based on input.
3511        Returns images of the pages in a template document for display based on the parameters that you specify.
3512        This method makes a synchronous HTTP request by default. To make an
3513        asynchronous HTTP request, please define a `callback` function
3514        to be invoked when receiving the response.
3515        >>> def callback_function(response):
3516        >>>     pprint(response)
3517        >>>
3518        >>> thread = api.get_pages_with_http_info(account_id, document_id, template_id, callback=callback_function)
3519
3520        :param callback function: The callback function
3521            for asynchronous request. (optional)
3522        :param str account_id: The external account number (int) or account ID Guid. (required)
3523        :param str document_id: The ID of the document being accessed. (required)
3524        :param str template_id: The ID of the template being accessed. (required)
3525        :param str count:
3526        :param str dpi:
3527        :param str max_height:
3528        :param str max_width:
3529        :param str nocache:
3530        :param str show_changes:
3531        :param str start_position:
3532        :return: PageImages
3533                 If the method is called asynchronously,
3534                 returns the request thread.
3535        """
3536
3537        all_params = ['account_id', 'document_id', 'template_id', 'count', 'dpi', 'max_height', 'max_width', 'nocache', 'show_changes', 'start_position']
3538        all_params.append('callback')
3539        all_params.append('_return_http_data_only')
3540        all_params.append('_preload_content')
3541        all_params.append('_request_timeout')
3542
3543        params = locals()
3544        for key, val in iteritems(params['kwargs']):
3545            if key not in all_params:
3546                raise TypeError(
3547                    "Got an unexpected keyword argument '%s'"
3548                    " to method get_pages" % key
3549                )
3550            params[key] = val
3551        del params['kwargs']
3552        # verify the required parameter 'account_id' is set
3553        if ('account_id' not in params) or (params['account_id'] is None):
3554            raise ValueError("Missing the required parameter `account_id` when calling `get_pages`")
3555        # verify the required parameter 'document_id' is set
3556        if ('document_id' not in params) or (params['document_id'] is None):
3557            raise ValueError("Missing the required parameter `document_id` when calling `get_pages`")
3558        # verify the required parameter 'template_id' is set
3559        if ('template_id' not in params) or (params['template_id'] is None):
3560            raise ValueError("Missing the required parameter `template_id` when calling `get_pages`")
3561
3562
3563        collection_formats = {}
3564
3565        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages'.replace('{format}', 'json')
3566        path_params = {}
3567        if 'account_id' in params:
3568            path_params['accountId'] = params['account_id']
3569        if 'document_id' in params:
3570            path_params['documentId'] = params['document_id']
3571        if 'template_id' in params:
3572            path_params['templateId'] = params['template_id']
3573
3574        query_params = {}
3575        if 'count' in params:
3576            query_params['count'] = params['count']
3577        if 'dpi' in params:
3578            query_params['dpi'] = params['dpi']
3579        if 'max_height' in params:
3580            query_params['max_height'] = params['max_height']
3581        if 'max_width' in params:
3582            query_params['max_width'] = params['max_width']
3583        if 'nocache' in params:
3584            query_params['nocache'] = params['nocache']
3585        if 'show_changes' in params:
3586            query_params['show_changes'] = params['show_changes']
3587        if 'start_position' in params:
3588            query_params['start_position'] = params['start_position']
3589
3590        header_params = {}
3591
3592        form_params = []
3593        local_var_files = {}
3594
3595        body_params = None
3596        # HTTP header `Accept`
3597        header_params['Accept'] = self.api_client.\
3598            select_header_accept(['application/json'])
3599
3600        # Authentication setting
3601        auth_settings = []
3602
3603        return self.api_client.call_api(resource_path, 'GET',
3604                                        path_params,
3605                                        query_params,
3606                                        header_params,
3607                                        body=body_params,
3608                                        post_params=form_params,
3609                                        files=local_var_files,
3610                                        response_type='PageImages',
3611                                        auth_settings=auth_settings,
3612                                        callback=params.get('callback'),
3613                                        _return_http_data_only=params.get('_return_http_data_only'),
3614                                        _preload_content=params.get('_preload_content', True),
3615                                        _request_timeout=params.get('_request_timeout'),
3616                                        collection_formats=collection_formats)

Returns document page image(s) based on input. Returns images of the pages in a template document for display based on the parameters that you specify. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_pages_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str count:
  • str dpi:
  • str max_height:
  • str max_width:
  • str nocache:
  • str show_changes:
  • str start_position:
Returns

PageImages If the method is called asynchronously, returns the request thread.

def get_template_document_html_definitions(self, account_id, document_id, template_id, **kwargs)
3618    def get_template_document_html_definitions(self, account_id, document_id, template_id, **kwargs):
3619        """
3620        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3621        
3622        This method makes a synchronous HTTP request by default. To make an
3623        asynchronous HTTP request, please define a `callback` function
3624        to be invoked when receiving the response.
3625        >>> def callback_function(response):
3626        >>>     pprint(response)
3627        >>>
3628        >>> thread = api.get_template_document_html_definitions(account_id, document_id, template_id, callback=callback_function)
3629
3630        :param callback function: The callback function
3631            for asynchronous request. (optional)
3632        :param str account_id: The external account number (int) or account ID Guid. (required)
3633        :param str document_id: The ID of the document being accessed. (required)
3634        :param str template_id: The ID of the template being accessed. (required)
3635        :return: DocumentHtmlDefinitionOriginals
3636                 If the method is called asynchronously,
3637                 returns the request thread.
3638        """
3639        kwargs['_return_http_data_only'] = True
3640        if kwargs.get('callback'):
3641            return self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3642        else:
3643            (data) = self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3644            return data

Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_template_document_html_definitions(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

DocumentHtmlDefinitionOriginals If the method is called asynchronously, returns the request thread.

def get_template_document_html_definitions_with_http_info(self, account_id, document_id, template_id, **kwargs)
3646    def get_template_document_html_definitions_with_http_info(self, account_id, document_id, template_id, **kwargs):
3647        """
3648        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3649        
3650        This method makes a synchronous HTTP request by default. To make an
3651        asynchronous HTTP request, please define a `callback` function
3652        to be invoked when receiving the response.
3653        >>> def callback_function(response):
3654        >>>     pprint(response)
3655        >>>
3656        >>> thread = api.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, callback=callback_function)
3657
3658        :param callback function: The callback function
3659            for asynchronous request. (optional)
3660        :param str account_id: The external account number (int) or account ID Guid. (required)
3661        :param str document_id: The ID of the document being accessed. (required)
3662        :param str template_id: The ID of the template being accessed. (required)
3663        :return: DocumentHtmlDefinitionOriginals
3664                 If the method is called asynchronously,
3665                 returns the request thread.
3666        """
3667
3668        all_params = ['account_id', 'document_id', 'template_id']
3669        all_params.append('callback')
3670        all_params.append('_return_http_data_only')
3671        all_params.append('_preload_content')
3672        all_params.append('_request_timeout')
3673
3674        params = locals()
3675        for key, val in iteritems(params['kwargs']):
3676            if key not in all_params:
3677                raise TypeError(
3678                    "Got an unexpected keyword argument '%s'"
3679                    " to method get_template_document_html_definitions" % key
3680                )
3681            params[key] = val
3682        del params['kwargs']
3683        # verify the required parameter 'account_id' is set
3684        if ('account_id' not in params) or (params['account_id'] is None):
3685            raise ValueError("Missing the required parameter `account_id` when calling `get_template_document_html_definitions`")
3686        # verify the required parameter 'document_id' is set
3687        if ('document_id' not in params) or (params['document_id'] is None):
3688            raise ValueError("Missing the required parameter `document_id` when calling `get_template_document_html_definitions`")
3689        # verify the required parameter 'template_id' is set
3690        if ('template_id' not in params) or (params['template_id'] is None):
3691            raise ValueError("Missing the required parameter `template_id` when calling `get_template_document_html_definitions`")
3692
3693
3694        collection_formats = {}
3695
3696        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/html_definitions'.replace('{format}', 'json')
3697        path_params = {}
3698        if 'account_id' in params:
3699            path_params['accountId'] = params['account_id']
3700        if 'document_id' in params:
3701            path_params['documentId'] = params['document_id']
3702        if 'template_id' in params:
3703            path_params['templateId'] = params['template_id']
3704
3705        query_params = {}
3706
3707        header_params = {}
3708
3709        form_params = []
3710        local_var_files = {}
3711
3712        body_params = None
3713        # HTTP header `Accept`
3714        header_params['Accept'] = self.api_client.\
3715            select_header_accept(['application/json'])
3716
3717        # Authentication setting
3718        auth_settings = []
3719
3720        return self.api_client.call_api(resource_path, 'GET',
3721                                        path_params,
3722                                        query_params,
3723                                        header_params,
3724                                        body=body_params,
3725                                        post_params=form_params,
3726                                        files=local_var_files,
3727                                        response_type='DocumentHtmlDefinitionOriginals',
3728                                        auth_settings=auth_settings,
3729                                        callback=params.get('callback'),
3730                                        _return_http_data_only=params.get('_return_http_data_only'),
3731                                        _preload_content=params.get('_preload_content', True),
3732                                        _request_timeout=params.get('_request_timeout'),
3733                                        collection_formats=collection_formats)

Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

DocumentHtmlDefinitionOriginals If the method is called asynchronously, returns the request thread.

def get_template_html_definitions(self, account_id, template_id, **kwargs)
3735    def get_template_html_definitions(self, account_id, template_id, **kwargs):
3736        """
3737        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3738        
3739        This method makes a synchronous HTTP request by default. To make an
3740        asynchronous HTTP request, please define a `callback` function
3741        to be invoked when receiving the response.
3742        >>> def callback_function(response):
3743        >>>     pprint(response)
3744        >>>
3745        >>> thread = api.get_template_html_definitions(account_id, template_id, callback=callback_function)
3746
3747        :param callback function: The callback function
3748            for asynchronous request. (optional)
3749        :param str account_id: The external account number (int) or account ID Guid. (required)
3750        :param str template_id: The ID of the template being accessed. (required)
3751        :return: DocumentHtmlDefinitionOriginals
3752                 If the method is called asynchronously,
3753                 returns the request thread.
3754        """
3755        kwargs['_return_http_data_only'] = True
3756        if kwargs.get('callback'):
3757            return self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3758        else:
3759            (data) = self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3760            return data

Get the Original HTML Definition used to generate the Responsive HTML for the template.

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_template_html_definitions(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

DocumentHtmlDefinitionOriginals If the method is called asynchronously, returns the request thread.

def get_template_html_definitions_with_http_info(self, account_id, template_id, **kwargs)
3762    def get_template_html_definitions_with_http_info(self, account_id, template_id, **kwargs):
3763        """
3764        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3765        
3766        This method makes a synchronous HTTP request by default. To make an
3767        asynchronous HTTP request, please define a `callback` function
3768        to be invoked when receiving the response.
3769        >>> def callback_function(response):
3770        >>>     pprint(response)
3771        >>>
3772        >>> thread = api.get_template_html_definitions_with_http_info(account_id, template_id, callback=callback_function)
3773
3774        :param callback function: The callback function
3775            for asynchronous request. (optional)
3776        :param str account_id: The external account number (int) or account ID Guid. (required)
3777        :param str template_id: The ID of the template being accessed. (required)
3778        :return: DocumentHtmlDefinitionOriginals
3779                 If the method is called asynchronously,
3780                 returns the request thread.
3781        """
3782
3783        all_params = ['account_id', 'template_id']
3784        all_params.append('callback')
3785        all_params.append('_return_http_data_only')
3786        all_params.append('_preload_content')
3787        all_params.append('_request_timeout')
3788
3789        params = locals()
3790        for key, val in iteritems(params['kwargs']):
3791            if key not in all_params:
3792                raise TypeError(
3793                    "Got an unexpected keyword argument '%s'"
3794                    " to method get_template_html_definitions" % key
3795                )
3796            params[key] = val
3797        del params['kwargs']
3798        # verify the required parameter 'account_id' is set
3799        if ('account_id' not in params) or (params['account_id'] is None):
3800            raise ValueError("Missing the required parameter `account_id` when calling `get_template_html_definitions`")
3801        # verify the required parameter 'template_id' is set
3802        if ('template_id' not in params) or (params['template_id'] is None):
3803            raise ValueError("Missing the required parameter `template_id` when calling `get_template_html_definitions`")
3804
3805
3806        collection_formats = {}
3807
3808        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/html_definitions'.replace('{format}', 'json')
3809        path_params = {}
3810        if 'account_id' in params:
3811            path_params['accountId'] = params['account_id']
3812        if 'template_id' in params:
3813            path_params['templateId'] = params['template_id']
3814
3815        query_params = {}
3816
3817        header_params = {}
3818
3819        form_params = []
3820        local_var_files = {}
3821
3822        body_params = None
3823        # HTTP header `Accept`
3824        header_params['Accept'] = self.api_client.\
3825            select_header_accept(['application/json'])
3826
3827        # Authentication setting
3828        auth_settings = []
3829
3830        return self.api_client.call_api(resource_path, 'GET',
3831                                        path_params,
3832                                        query_params,
3833                                        header_params,
3834                                        body=body_params,
3835                                        post_params=form_params,
3836                                        files=local_var_files,
3837                                        response_type='DocumentHtmlDefinitionOriginals',
3838                                        auth_settings=auth_settings,
3839                                        callback=params.get('callback'),
3840                                        _return_http_data_only=params.get('_return_http_data_only'),
3841                                        _preload_content=params.get('_preload_content', True),
3842                                        _request_timeout=params.get('_request_timeout'),
3843                                        collection_formats=collection_formats)

Get the Original HTML Definition used to generate the Responsive HTML for the template.

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_template_html_definitions_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

DocumentHtmlDefinitionOriginals If the method is called asynchronously, returns the request thread.

def list_bulk_recipients(self, account_id, recipient_id, template_id, **kwargs)
3845    def list_bulk_recipients(self, account_id, recipient_id, template_id, **kwargs):
3846        """
3847        Gets the bulk recipient file from a template.
3848        Retrieves the bulk recipient file information from a template that has a bulk recipient.
3849        This method makes a synchronous HTTP request by default. To make an
3850        asynchronous HTTP request, please define a `callback` function
3851        to be invoked when receiving the response.
3852        >>> def callback_function(response):
3853        >>>     pprint(response)
3854        >>>
3855        >>> thread = api.list_bulk_recipients(account_id, recipient_id, template_id, callback=callback_function)
3856
3857        :param callback function: The callback function
3858            for asynchronous request. (optional)
3859        :param str account_id: The external account number (int) or account ID Guid. (required)
3860        :param str recipient_id: The ID of the recipient being accessed. (required)
3861        :param str template_id: The ID of the template being accessed. (required)
3862        :param str include_tabs:
3863        :param str start_position:
3864        :return: BulkRecipientsResponse
3865                 If the method is called asynchronously,
3866                 returns the request thread.
3867        """
3868        kwargs['_return_http_data_only'] = True
3869        if kwargs.get('callback'):
3870            return self.list_bulk_recipients_with_http_info(account_id, recipient_id, template_id, **kwargs)
3871        else:
3872            (data) = self.list_bulk_recipients_with_http_info(account_id, recipient_id, template_id, **kwargs)
3873            return data

Gets the bulk recipient file from a template. Retrieves the bulk recipient file information from a template that has a bulk recipient. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_bulk_recipients(account_id, recipient_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str include_tabs:
  • str start_position:
Returns

BulkRecipientsResponse If the method is called asynchronously, returns the request thread.

def list_bulk_recipients_with_http_info(self, account_id, recipient_id, template_id, **kwargs)
3875    def list_bulk_recipients_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
3876        """
3877        Gets the bulk recipient file from a template.
3878        Retrieves the bulk recipient file information from a template that has a bulk recipient.
3879        This method makes a synchronous HTTP request by default. To make an
3880        asynchronous HTTP request, please define a `callback` function
3881        to be invoked when receiving the response.
3882        >>> def callback_function(response):
3883        >>>     pprint(response)
3884        >>>
3885        >>> thread = api.list_bulk_recipients_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
3886
3887        :param callback function: The callback function
3888            for asynchronous request. (optional)
3889        :param str account_id: The external account number (int) or account ID Guid. (required)
3890        :param str recipient_id: The ID of the recipient being accessed. (required)
3891        :param str template_id: The ID of the template being accessed. (required)
3892        :param str include_tabs:
3893        :param str start_position:
3894        :return: BulkRecipientsResponse
3895                 If the method is called asynchronously,
3896                 returns the request thread.
3897        """
3898
3899        all_params = ['account_id', 'recipient_id', 'template_id', 'include_tabs', 'start_position']
3900        all_params.append('callback')
3901        all_params.append('_return_http_data_only')
3902        all_params.append('_preload_content')
3903        all_params.append('_request_timeout')
3904
3905        params = locals()
3906        for key, val in iteritems(params['kwargs']):
3907            if key not in all_params:
3908                raise TypeError(
3909                    "Got an unexpected keyword argument '%s'"
3910                    " to method list_bulk_recipients" % key
3911                )
3912            params[key] = val
3913        del params['kwargs']
3914        # verify the required parameter 'account_id' is set
3915        if ('account_id' not in params) or (params['account_id'] is None):
3916            raise ValueError("Missing the required parameter `account_id` when calling `list_bulk_recipients`")
3917        # verify the required parameter 'recipient_id' is set
3918        if ('recipient_id' not in params) or (params['recipient_id'] is None):
3919            raise ValueError("Missing the required parameter `recipient_id` when calling `list_bulk_recipients`")
3920        # verify the required parameter 'template_id' is set
3921        if ('template_id' not in params) or (params['template_id'] is None):
3922            raise ValueError("Missing the required parameter `template_id` when calling `list_bulk_recipients`")
3923
3924
3925        collection_formats = {}
3926
3927        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/bulk_recipients'.replace('{format}', 'json')
3928        path_params = {}
3929        if 'account_id' in params:
3930            path_params['accountId'] = params['account_id']
3931        if 'recipient_id' in params:
3932            path_params['recipientId'] = params['recipient_id']
3933        if 'template_id' in params:
3934            path_params['templateId'] = params['template_id']
3935
3936        query_params = {}
3937        if 'include_tabs' in params:
3938            query_params['include_tabs'] = params['include_tabs']
3939        if 'start_position' in params:
3940            query_params['start_position'] = params['start_position']
3941
3942        header_params = {}
3943
3944        form_params = []
3945        local_var_files = {}
3946
3947        body_params = None
3948        # HTTP header `Accept`
3949        header_params['Accept'] = self.api_client.\
3950            select_header_accept(['application/json'])
3951
3952        # Authentication setting
3953        auth_settings = []
3954
3955        return self.api_client.call_api(resource_path, 'GET',
3956                                        path_params,
3957                                        query_params,
3958                                        header_params,
3959                                        body=body_params,
3960                                        post_params=form_params,
3961                                        files=local_var_files,
3962                                        response_type='BulkRecipientsResponse',
3963                                        auth_settings=auth_settings,
3964                                        callback=params.get('callback'),
3965                                        _return_http_data_only=params.get('_return_http_data_only'),
3966                                        _preload_content=params.get('_preload_content', True),
3967                                        _request_timeout=params.get('_request_timeout'),
3968                                        collection_formats=collection_formats)

Gets the bulk recipient file from a template. Retrieves the bulk recipient file information from a template that has a bulk recipient. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_bulk_recipients_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str include_tabs:
  • str start_position:
Returns

BulkRecipientsResponse If the method is called asynchronously, returns the request thread.

def list_custom_fields(self, account_id, template_id, **kwargs)
3970    def list_custom_fields(self, account_id, template_id, **kwargs):
3971        """
3972        Gets the custom document fields from a template.
3973        Retrieves the custom document field information from an existing template.
3974        This method makes a synchronous HTTP request by default. To make an
3975        asynchronous HTTP request, please define a `callback` function
3976        to be invoked when receiving the response.
3977        >>> def callback_function(response):
3978        >>>     pprint(response)
3979        >>>
3980        >>> thread = api.list_custom_fields(account_id, template_id, callback=callback_function)
3981
3982        :param callback function: The callback function
3983            for asynchronous request. (optional)
3984        :param str account_id: The external account number (int) or account ID Guid. (required)
3985        :param str template_id: The ID of the template being accessed. (required)
3986        :return: CustomFields
3987                 If the method is called asynchronously,
3988                 returns the request thread.
3989        """
3990        kwargs['_return_http_data_only'] = True
3991        if kwargs.get('callback'):
3992            return self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3993        else:
3994            (data) = self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3995            return data

Gets the custom document fields from a template. Retrieves the custom document field information from an existing template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_custom_fields(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

CustomFields If the method is called asynchronously, returns the request thread.

def list_custom_fields_with_http_info(self, account_id, template_id, **kwargs)
3997    def list_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
3998        """
3999        Gets the custom document fields from a template.
4000        Retrieves the custom document field information from an existing template.
4001        This method makes a synchronous HTTP request by default. To make an
4002        asynchronous HTTP request, please define a `callback` function
4003        to be invoked when receiving the response.
4004        >>> def callback_function(response):
4005        >>>     pprint(response)
4006        >>>
4007        >>> thread = api.list_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
4008
4009        :param callback function: The callback function
4010            for asynchronous request. (optional)
4011        :param str account_id: The external account number (int) or account ID Guid. (required)
4012        :param str template_id: The ID of the template being accessed. (required)
4013        :return: CustomFields
4014                 If the method is called asynchronously,
4015                 returns the request thread.
4016        """
4017
4018        all_params = ['account_id', 'template_id']
4019        all_params.append('callback')
4020        all_params.append('_return_http_data_only')
4021        all_params.append('_preload_content')
4022        all_params.append('_request_timeout')
4023
4024        params = locals()
4025        for key, val in iteritems(params['kwargs']):
4026            if key not in all_params:
4027                raise TypeError(
4028                    "Got an unexpected keyword argument '%s'"
4029                    " to method list_custom_fields" % key
4030                )
4031            params[key] = val
4032        del params['kwargs']
4033        # verify the required parameter 'account_id' is set
4034        if ('account_id' not in params) or (params['account_id'] is None):
4035            raise ValueError("Missing the required parameter `account_id` when calling `list_custom_fields`")
4036        # verify the required parameter 'template_id' is set
4037        if ('template_id' not in params) or (params['template_id'] is None):
4038            raise ValueError("Missing the required parameter `template_id` when calling `list_custom_fields`")
4039
4040
4041        collection_formats = {}
4042
4043        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
4044        path_params = {}
4045        if 'account_id' in params:
4046            path_params['accountId'] = params['account_id']
4047        if 'template_id' in params:
4048            path_params['templateId'] = params['template_id']
4049
4050        query_params = {}
4051
4052        header_params = {}
4053
4054        form_params = []
4055        local_var_files = {}
4056
4057        body_params = None
4058        # HTTP header `Accept`
4059        header_params['Accept'] = self.api_client.\
4060            select_header_accept(['application/json'])
4061
4062        # Authentication setting
4063        auth_settings = []
4064
4065        return self.api_client.call_api(resource_path, 'GET',
4066                                        path_params,
4067                                        query_params,
4068                                        header_params,
4069                                        body=body_params,
4070                                        post_params=form_params,
4071                                        files=local_var_files,
4072                                        response_type='CustomFields',
4073                                        auth_settings=auth_settings,
4074                                        callback=params.get('callback'),
4075                                        _return_http_data_only=params.get('_return_http_data_only'),
4076                                        _preload_content=params.get('_preload_content', True),
4077                                        _request_timeout=params.get('_request_timeout'),
4078                                        collection_formats=collection_formats)

Gets the custom document fields from a template. Retrieves the custom document field information from an existing template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

CustomFields If the method is called asynchronously, returns the request thread.

def list_document_fields(self, account_id, document_id, template_id, **kwargs)
4080    def list_document_fields(self, account_id, document_id, template_id, **kwargs):
4081        """
4082        Gets the custom document fields for a an existing template document.
4083        Retrieves the custom document fields for an existing template document.
4084        This method makes a synchronous HTTP request by default. To make an
4085        asynchronous HTTP request, please define a `callback` function
4086        to be invoked when receiving the response.
4087        >>> def callback_function(response):
4088        >>>     pprint(response)
4089        >>>
4090        >>> thread = api.list_document_fields(account_id, document_id, template_id, callback=callback_function)
4091
4092        :param callback function: The callback function
4093            for asynchronous request. (optional)
4094        :param str account_id: The external account number (int) or account ID Guid. (required)
4095        :param str document_id: The ID of the document being accessed. (required)
4096        :param str template_id: The ID of the template being accessed. (required)
4097        :return: DocumentFieldsInformation
4098                 If the method is called asynchronously,
4099                 returns the request thread.
4100        """
4101        kwargs['_return_http_data_only'] = True
4102        if kwargs.get('callback'):
4103            return self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
4104        else:
4105            (data) = self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
4106            return data

Gets the custom document fields for a an existing template document. Retrieves the custom document fields for an existing template document. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_document_fields(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

DocumentFieldsInformation If the method is called asynchronously, returns the request thread.

def list_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs)
4108    def list_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
4109        """
4110        Gets the custom document fields for a an existing template document.
4111        Retrieves the custom document fields for an existing template document.
4112        This method makes a synchronous HTTP request by default. To make an
4113        asynchronous HTTP request, please define a `callback` function
4114        to be invoked when receiving the response.
4115        >>> def callback_function(response):
4116        >>>     pprint(response)
4117        >>>
4118        >>> thread = api.list_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
4119
4120        :param callback function: The callback function
4121            for asynchronous request. (optional)
4122        :param str account_id: The external account number (int) or account ID Guid. (required)
4123        :param str document_id: The ID of the document being accessed. (required)
4124        :param str template_id: The ID of the template being accessed. (required)
4125        :return: DocumentFieldsInformation
4126                 If the method is called asynchronously,
4127                 returns the request thread.
4128        """
4129
4130        all_params = ['account_id', 'document_id', 'template_id']
4131        all_params.append('callback')
4132        all_params.append('_return_http_data_only')
4133        all_params.append('_preload_content')
4134        all_params.append('_request_timeout')
4135
4136        params = locals()
4137        for key, val in iteritems(params['kwargs']):
4138            if key not in all_params:
4139                raise TypeError(
4140                    "Got an unexpected keyword argument '%s'"
4141                    " to method list_document_fields" % key
4142                )
4143            params[key] = val
4144        del params['kwargs']
4145        # verify the required parameter 'account_id' is set
4146        if ('account_id' not in params) or (params['account_id'] is None):
4147            raise ValueError("Missing the required parameter `account_id` when calling `list_document_fields`")
4148        # verify the required parameter 'document_id' is set
4149        if ('document_id' not in params) or (params['document_id'] is None):
4150            raise ValueError("Missing the required parameter `document_id` when calling `list_document_fields`")
4151        # verify the required parameter 'template_id' is set
4152        if ('template_id' not in params) or (params['template_id'] is None):
4153            raise ValueError("Missing the required parameter `template_id` when calling `list_document_fields`")
4154
4155
4156        collection_formats = {}
4157
4158        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
4159        path_params = {}
4160        if 'account_id' in params:
4161            path_params['accountId'] = params['account_id']
4162        if 'document_id' in params:
4163            path_params['documentId'] = params['document_id']
4164        if 'template_id' in params:
4165            path_params['templateId'] = params['template_id']
4166
4167        query_params = {}
4168
4169        header_params = {}
4170
4171        form_params = []
4172        local_var_files = {}
4173
4174        body_params = None
4175        # HTTP header `Accept`
4176        header_params['Accept'] = self.api_client.\
4177            select_header_accept(['application/json'])
4178
4179        # Authentication setting
4180        auth_settings = []
4181
4182        return self.api_client.call_api(resource_path, 'GET',
4183                                        path_params,
4184                                        query_params,
4185                                        header_params,
4186                                        body=body_params,
4187                                        post_params=form_params,
4188                                        files=local_var_files,
4189                                        response_type='DocumentFieldsInformation',
4190                                        auth_settings=auth_settings,
4191                                        callback=params.get('callback'),
4192                                        _return_http_data_only=params.get('_return_http_data_only'),
4193                                        _preload_content=params.get('_preload_content', True),
4194                                        _request_timeout=params.get('_request_timeout'),
4195                                        collection_formats=collection_formats)

Gets the custom document fields for a an existing template document. Retrieves the custom document fields for an existing template document. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

DocumentFieldsInformation If the method is called asynchronously, returns the request thread.

def list_documents(self, account_id, template_id, **kwargs)
4197    def list_documents(self, account_id, template_id, **kwargs):
4198        """
4199        Gets a list of documents associated with a template.
4200        Retrieves a list of documents associated with the specified template.
4201        This method makes a synchronous HTTP request by default. To make an
4202        asynchronous HTTP request, please define a `callback` function
4203        to be invoked when receiving the response.
4204        >>> def callback_function(response):
4205        >>>     pprint(response)
4206        >>>
4207        >>> thread = api.list_documents(account_id, template_id, callback=callback_function)
4208
4209        :param callback function: The callback function
4210            for asynchronous request. (optional)
4211        :param str account_id: The external account number (int) or account ID Guid. (required)
4212        :param str template_id: The ID of the template being accessed. (required)
4213        :param str include_tabs:
4214        :return: TemplateDocumentsResult
4215                 If the method is called asynchronously,
4216                 returns the request thread.
4217        """
4218        kwargs['_return_http_data_only'] = True
4219        if kwargs.get('callback'):
4220            return self.list_documents_with_http_info(account_id, template_id, **kwargs)
4221        else:
4222            (data) = self.list_documents_with_http_info(account_id, template_id, **kwargs)
4223            return data

Gets a list of documents associated with a template. Retrieves a list of documents associated with the specified template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_documents(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str include_tabs:
Returns

TemplateDocumentsResult If the method is called asynchronously, returns the request thread.

def list_documents_with_http_info(self, account_id, template_id, **kwargs)
4225    def list_documents_with_http_info(self, account_id, template_id, **kwargs):
4226        """
4227        Gets a list of documents associated with a template.
4228        Retrieves a list of documents associated with the specified template.
4229        This method makes a synchronous HTTP request by default. To make an
4230        asynchronous HTTP request, please define a `callback` function
4231        to be invoked when receiving the response.
4232        >>> def callback_function(response):
4233        >>>     pprint(response)
4234        >>>
4235        >>> thread = api.list_documents_with_http_info(account_id, template_id, callback=callback_function)
4236
4237        :param callback function: The callback function
4238            for asynchronous request. (optional)
4239        :param str account_id: The external account number (int) or account ID Guid. (required)
4240        :param str template_id: The ID of the template being accessed. (required)
4241        :param str include_tabs:
4242        :return: TemplateDocumentsResult
4243                 If the method is called asynchronously,
4244                 returns the request thread.
4245        """
4246
4247        all_params = ['account_id', 'template_id', 'include_tabs']
4248        all_params.append('callback')
4249        all_params.append('_return_http_data_only')
4250        all_params.append('_preload_content')
4251        all_params.append('_request_timeout')
4252
4253        params = locals()
4254        for key, val in iteritems(params['kwargs']):
4255            if key not in all_params:
4256                raise TypeError(
4257                    "Got an unexpected keyword argument '%s'"
4258                    " to method list_documents" % key
4259                )
4260            params[key] = val
4261        del params['kwargs']
4262        # verify the required parameter 'account_id' is set
4263        if ('account_id' not in params) or (params['account_id'] is None):
4264            raise ValueError("Missing the required parameter `account_id` when calling `list_documents`")
4265        # verify the required parameter 'template_id' is set
4266        if ('template_id' not in params) or (params['template_id'] is None):
4267            raise ValueError("Missing the required parameter `template_id` when calling `list_documents`")
4268
4269
4270        collection_formats = {}
4271
4272        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
4273        path_params = {}
4274        if 'account_id' in params:
4275            path_params['accountId'] = params['account_id']
4276        if 'template_id' in params:
4277            path_params['templateId'] = params['template_id']
4278
4279        query_params = {}
4280        if 'include_tabs' in params:
4281            query_params['include_tabs'] = params['include_tabs']
4282
4283        header_params = {}
4284
4285        form_params = []
4286        local_var_files = {}
4287
4288        body_params = None
4289        # HTTP header `Accept`
4290        header_params['Accept'] = self.api_client.\
4291            select_header_accept(['application/json'])
4292
4293        # Authentication setting
4294        auth_settings = []
4295
4296        return self.api_client.call_api(resource_path, 'GET',
4297                                        path_params,
4298                                        query_params,
4299                                        header_params,
4300                                        body=body_params,
4301                                        post_params=form_params,
4302                                        files=local_var_files,
4303                                        response_type='TemplateDocumentsResult',
4304                                        auth_settings=auth_settings,
4305                                        callback=params.get('callback'),
4306                                        _return_http_data_only=params.get('_return_http_data_only'),
4307                                        _preload_content=params.get('_preload_content', True),
4308                                        _request_timeout=params.get('_request_timeout'),
4309                                        collection_formats=collection_formats)

Gets a list of documents associated with a template. Retrieves a list of documents associated with the specified template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_documents_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str include_tabs:
Returns

TemplateDocumentsResult If the method is called asynchronously, returns the request thread.

def list_recipients(self, account_id, template_id, **kwargs)
4311    def list_recipients(self, account_id, template_id, **kwargs):
4312        """
4313        Gets recipient information from a template.
4314        Retrieves the information for all recipients in the specified template.
4315        This method makes a synchronous HTTP request by default. To make an
4316        asynchronous HTTP request, please define a `callback` function
4317        to be invoked when receiving the response.
4318        >>> def callback_function(response):
4319        >>>     pprint(response)
4320        >>>
4321        >>> thread = api.list_recipients(account_id, template_id, callback=callback_function)
4322
4323        :param callback function: The callback function
4324            for asynchronous request. (optional)
4325        :param str account_id: The external account number (int) or account ID Guid. (required)
4326        :param str template_id: The ID of the template being accessed. (required)
4327        :param str include_anchor_tab_locations:  When set to **true** and `include_tabs` is set to **true**, all tabs with anchor tab properties are included in the response. 
4328        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4329        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4330        :return: Recipients
4331                 If the method is called asynchronously,
4332                 returns the request thread.
4333        """
4334        kwargs['_return_http_data_only'] = True
4335        if kwargs.get('callback'):
4336            return self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4337        else:
4338            (data) = self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4339            return data

Gets recipient information from a template. Retrieves the information for all recipients in the specified template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_recipients(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str include_anchor_tab_locations: When set to true and include_tabs is set to true, all tabs with anchor tab properties are included in the response.
  • str include_extended: When set to true, the extended properties are included in the response.
  • str include_tabs: When set to true, the tab information associated with the recipient is included in the response.
Returns

Recipients If the method is called asynchronously, returns the request thread.

def list_recipients_with_http_info(self, account_id, template_id, **kwargs)
4341    def list_recipients_with_http_info(self, account_id, template_id, **kwargs):
4342        """
4343        Gets recipient information from a template.
4344        Retrieves the information for all recipients in the specified template.
4345        This method makes a synchronous HTTP request by default. To make an
4346        asynchronous HTTP request, please define a `callback` function
4347        to be invoked when receiving the response.
4348        >>> def callback_function(response):
4349        >>>     pprint(response)
4350        >>>
4351        >>> thread = api.list_recipients_with_http_info(account_id, template_id, callback=callback_function)
4352
4353        :param callback function: The callback function
4354            for asynchronous request. (optional)
4355        :param str account_id: The external account number (int) or account ID Guid. (required)
4356        :param str template_id: The ID of the template being accessed. (required)
4357        :param str include_anchor_tab_locations:  When set to **true** and `include_tabs` is set to **true**, all tabs with anchor tab properties are included in the response. 
4358        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4359        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4360        :return: Recipients
4361                 If the method is called asynchronously,
4362                 returns the request thread.
4363        """
4364
4365        all_params = ['account_id', 'template_id', 'include_anchor_tab_locations', 'include_extended', 'include_tabs']
4366        all_params.append('callback')
4367        all_params.append('_return_http_data_only')
4368        all_params.append('_preload_content')
4369        all_params.append('_request_timeout')
4370
4371        params = locals()
4372        for key, val in iteritems(params['kwargs']):
4373            if key not in all_params:
4374                raise TypeError(
4375                    "Got an unexpected keyword argument '%s'"
4376                    " to method list_recipients" % key
4377                )
4378            params[key] = val
4379        del params['kwargs']
4380        # verify the required parameter 'account_id' is set
4381        if ('account_id' not in params) or (params['account_id'] is None):
4382            raise ValueError("Missing the required parameter `account_id` when calling `list_recipients`")
4383        # verify the required parameter 'template_id' is set
4384        if ('template_id' not in params) or (params['template_id'] is None):
4385            raise ValueError("Missing the required parameter `template_id` when calling `list_recipients`")
4386
4387
4388        collection_formats = {}
4389
4390        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
4391        path_params = {}
4392        if 'account_id' in params:
4393            path_params['accountId'] = params['account_id']
4394        if 'template_id' in params:
4395            path_params['templateId'] = params['template_id']
4396
4397        query_params = {}
4398        if 'include_anchor_tab_locations' in params:
4399            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4400        if 'include_extended' in params:
4401            query_params['include_extended'] = params['include_extended']
4402        if 'include_tabs' in params:
4403            query_params['include_tabs'] = params['include_tabs']
4404
4405        header_params = {}
4406
4407        form_params = []
4408        local_var_files = {}
4409
4410        body_params = None
4411        # HTTP header `Accept`
4412        header_params['Accept'] = self.api_client.\
4413            select_header_accept(['application/json'])
4414
4415        # Authentication setting
4416        auth_settings = []
4417
4418        return self.api_client.call_api(resource_path, 'GET',
4419                                        path_params,
4420                                        query_params,
4421                                        header_params,
4422                                        body=body_params,
4423                                        post_params=form_params,
4424                                        files=local_var_files,
4425                                        response_type='Recipients',
4426                                        auth_settings=auth_settings,
4427                                        callback=params.get('callback'),
4428                                        _return_http_data_only=params.get('_return_http_data_only'),
4429                                        _preload_content=params.get('_preload_content', True),
4430                                        _request_timeout=params.get('_request_timeout'),
4431                                        collection_formats=collection_formats)

Gets recipient information from a template. Retrieves the information for all recipients in the specified template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_recipients_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str include_anchor_tab_locations: When set to true and include_tabs is set to true, all tabs with anchor tab properties are included in the response.
  • str include_extended: When set to true, the extended properties are included in the response.
  • str include_tabs: When set to true, the tab information associated with the recipient is included in the response.
Returns

Recipients If the method is called asynchronously, returns the request thread.

def list_tabs(self, account_id, recipient_id, template_id, **kwargs)
4433    def list_tabs(self, account_id, recipient_id, template_id, **kwargs):
4434        """
4435        Gets the tabs information for a signer or sign-in-person recipient in a template.
4436        Gets the tabs information for a signer or sign-in-person recipient in a template.
4437        This method makes a synchronous HTTP request by default. To make an
4438        asynchronous HTTP request, please define a `callback` function
4439        to be invoked when receiving the response.
4440        >>> def callback_function(response):
4441        >>>     pprint(response)
4442        >>>
4443        >>> thread = api.list_tabs(account_id, recipient_id, template_id, callback=callback_function)
4444
4445        :param callback function: The callback function
4446            for asynchronous request. (optional)
4447        :param str account_id: The external account number (int) or account ID Guid. (required)
4448        :param str recipient_id: The ID of the recipient being accessed. (required)
4449        :param str template_id: The ID of the template being accessed. (required)
4450        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4451        :param str include_metadata:
4452        :return: Tabs
4453                 If the method is called asynchronously,
4454                 returns the request thread.
4455        """
4456        kwargs['_return_http_data_only'] = True
4457        if kwargs.get('callback'):
4458            return self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4459        else:
4460            (data) = self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4461            return data

Gets the tabs information for a signer or sign-in-person recipient in a template. Gets the tabs information for a signer or sign-in-person recipient in a template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_tabs(account_id, recipient_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str include_anchor_tab_locations: When set to true, all tabs with anchor tab properties are included in the response.
  • str include_metadata:
Returns

Tabs If the method is called asynchronously, returns the request thread.

def list_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs)
4463    def list_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
4464        """
4465        Gets the tabs information for a signer or sign-in-person recipient in a template.
4466        Gets the tabs information for a signer or sign-in-person recipient in a template.
4467        This method makes a synchronous HTTP request by default. To make an
4468        asynchronous HTTP request, please define a `callback` function
4469        to be invoked when receiving the response.
4470        >>> def callback_function(response):
4471        >>>     pprint(response)
4472        >>>
4473        >>> thread = api.list_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
4474
4475        :param callback function: The callback function
4476            for asynchronous request. (optional)
4477        :param str account_id: The external account number (int) or account ID Guid. (required)
4478        :param str recipient_id: The ID of the recipient being accessed. (required)
4479        :param str template_id: The ID of the template being accessed. (required)
4480        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4481        :param str include_metadata:
4482        :return: Tabs
4483                 If the method is called asynchronously,
4484                 returns the request thread.
4485        """
4486
4487        all_params = ['account_id', 'recipient_id', 'template_id', 'include_anchor_tab_locations', 'include_metadata']
4488        all_params.append('callback')
4489        all_params.append('_return_http_data_only')
4490        all_params.append('_preload_content')
4491        all_params.append('_request_timeout')
4492
4493        params = locals()
4494        for key, val in iteritems(params['kwargs']):
4495            if key not in all_params:
4496                raise TypeError(
4497                    "Got an unexpected keyword argument '%s'"
4498                    " to method list_tabs" % key
4499                )
4500            params[key] = val
4501        del params['kwargs']
4502        # verify the required parameter 'account_id' is set
4503        if ('account_id' not in params) or (params['account_id'] is None):
4504            raise ValueError("Missing the required parameter `account_id` when calling `list_tabs`")
4505        # verify the required parameter 'recipient_id' is set
4506        if ('recipient_id' not in params) or (params['recipient_id'] is None):
4507            raise ValueError("Missing the required parameter `recipient_id` when calling `list_tabs`")
4508        # verify the required parameter 'template_id' is set
4509        if ('template_id' not in params) or (params['template_id'] is None):
4510            raise ValueError("Missing the required parameter `template_id` when calling `list_tabs`")
4511
4512
4513        collection_formats = {}
4514
4515        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
4516        path_params = {}
4517        if 'account_id' in params:
4518            path_params['accountId'] = params['account_id']
4519        if 'recipient_id' in params:
4520            path_params['recipientId'] = params['recipient_id']
4521        if 'template_id' in params:
4522            path_params['templateId'] = params['template_id']
4523
4524        query_params = {}
4525        if 'include_anchor_tab_locations' in params:
4526            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4527        if 'include_metadata' in params:
4528            query_params['include_metadata'] = params['include_metadata']
4529
4530        header_params = {}
4531
4532        form_params = []
4533        local_var_files = {}
4534
4535        body_params = None
4536        # HTTP header `Accept`
4537        header_params['Accept'] = self.api_client.\
4538            select_header_accept(['application/json'])
4539
4540        # Authentication setting
4541        auth_settings = []
4542
4543        return self.api_client.call_api(resource_path, 'GET',
4544                                        path_params,
4545                                        query_params,
4546                                        header_params,
4547                                        body=body_params,
4548                                        post_params=form_params,
4549                                        files=local_var_files,
4550                                        response_type='Tabs',
4551                                        auth_settings=auth_settings,
4552                                        callback=params.get('callback'),
4553                                        _return_http_data_only=params.get('_return_http_data_only'),
4554                                        _preload_content=params.get('_preload_content', True),
4555                                        _request_timeout=params.get('_request_timeout'),
4556                                        collection_formats=collection_formats)

Gets the tabs information for a signer or sign-in-person recipient in a template. Gets the tabs information for a signer or sign-in-person recipient in a template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str include_anchor_tab_locations: When set to true, all tabs with anchor tab properties are included in the response.
  • str include_metadata:
Returns

Tabs If the method is called asynchronously, returns the request thread.

def list_templates(self, account_id, **kwargs)
4558    def list_templates(self, account_id, **kwargs):
4559        """
4560        Gets the definition of a template.
4561        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4562        This method makes a synchronous HTTP request by default. To make an
4563        asynchronous HTTP request, please define a `callback` function
4564        to be invoked when receiving the response.
4565        >>> def callback_function(response):
4566        >>>     pprint(response)
4567        >>>
4568        >>> thread = api.list_templates(account_id, callback=callback_function)
4569
4570        :param callback function: The callback function
4571            for asynchronous request. (optional)
4572        :param str account_id: The external account number (int) or account ID Guid. (required)
4573        :param str count: Number of records to return in the cache.
4574        :param str created_from_date:
4575        :param str created_to_date:
4576        :param str folder_ids: A comma separated list of folder ID GUIDs.
4577        :param str folder_types:
4578        :param str from_date: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
4579        :param str include: A comma separated list of additional template attributes to include in the response. Valid values are: recipients, folders, documents, custom_fields, and notifications.
4580        :param str is_deleted_template_only:
4581        :param str is_download:
4582        :param str modified_from_date:
4583        :param str modified_to_date:
4584        :param str order: Sets the direction order used to sort the list. Valid values are: -asc = ascending sort order (a to z)  -desc = descending sort order (z to a)
4585        :param str order_by: Sets the file attribute used to sort the list. Valid values are:  -name: template name  -modified: date/time template was last modified.  -used: date/time the template was last used.
4586        :param str search_fields:
4587        :param str search_text: The search text used to search the names of templates.
4588        :param str shared_by_me: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
4589        :param str start_position: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
4590        :param str template_ids:
4591        :param str to_date: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
4592        :param str used_from_date: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
4593        :param str used_to_date: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
4594        :param str user_filter: Sets if the templates shown in the response Valid values are:  -owned_by_me: only shows templates the user owns.  -shared_with_me: only shows templates that are shared with the user.  -all: shows all templates owned or shared with the user.
4595        :param str user_id:
4596        :return: EnvelopeTemplateResults
4597                 If the method is called asynchronously,
4598                 returns the request thread.
4599        """
4600        kwargs['_return_http_data_only'] = True
4601        if kwargs.get('callback'):
4602            return self.list_templates_with_http_info(account_id, **kwargs)
4603        else:
4604            (data) = self.list_templates_with_http_info(account_id, **kwargs)
4605            return data

Gets the definition of a template. Retrieves the list of templates for the specified account. The request can be limited to a specific folder. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_templates(account_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str count: Number of records to return in the cache.
  • str created_from_date:
  • str created_to_date:
  • str folder_ids: A comma separated list of folder ID GUIDs.
  • str folder_types:
  • str from_date: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
  • str include: A comma separated list of additional template attributes to include in the response. Valid values are: recipients, folders, documents, custom_fields, and notifications.
  • str is_deleted_template_only:
  • str is_download:
  • str modified_from_date:
  • str modified_to_date:
  • str order: Sets the direction order used to sort the list. Valid values are: -asc = ascending sort order (a to z) -desc = descending sort order (z to a)
  • str order_by: Sets the file attribute used to sort the list. Valid values are: -name: template name -modified: date/time template was last modified. -used: date/time the template was last used.
  • str search_fields:
  • str search_text: The search text used to search the names of templates.
  • str shared_by_me: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
  • str start_position: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
  • str template_ids:
  • str to_date: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
  • str used_from_date: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
  • str used_to_date: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
  • str user_filter: Sets if the templates shown in the response Valid values are: -owned_by_me: only shows templates the user owns. -shared_with_me: only shows templates that are shared with the user. -all: shows all templates owned or shared with the user.
  • str user_id:
Returns

EnvelopeTemplateResults If the method is called asynchronously, returns the request thread.

def list_templates_with_http_info(self, account_id, **kwargs)
4607    def list_templates_with_http_info(self, account_id, **kwargs):
4608        """
4609        Gets the definition of a template.
4610        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4611        This method makes a synchronous HTTP request by default. To make an
4612        asynchronous HTTP request, please define a `callback` function
4613        to be invoked when receiving the response.
4614        >>> def callback_function(response):
4615        >>>     pprint(response)
4616        >>>
4617        >>> thread = api.list_templates_with_http_info(account_id, callback=callback_function)
4618
4619        :param callback function: The callback function
4620            for asynchronous request. (optional)
4621        :param str account_id: The external account number (int) or account ID Guid. (required)
4622        :param str count: Number of records to return in the cache.
4623        :param str created_from_date:
4624        :param str created_to_date:
4625        :param str folder_ids: A comma separated list of folder ID GUIDs.
4626        :param str folder_types:
4627        :param str from_date: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
4628        :param str include: A comma separated list of additional template attributes to include in the response. Valid values are: recipients, folders, documents, custom_fields, and notifications.
4629        :param str is_deleted_template_only:
4630        :param str is_download:
4631        :param str modified_from_date:
4632        :param str modified_to_date:
4633        :param str order: Sets the direction order used to sort the list. Valid values are: -asc = ascending sort order (a to z)  -desc = descending sort order (z to a)
4634        :param str order_by: Sets the file attribute used to sort the list. Valid values are:  -name: template name  -modified: date/time template was last modified.  -used: date/time the template was last used.
4635        :param str search_fields:
4636        :param str search_text: The search text used to search the names of templates.
4637        :param str shared_by_me: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
4638        :param str start_position: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
4639        :param str template_ids:
4640        :param str to_date: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
4641        :param str used_from_date: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
4642        :param str used_to_date: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
4643        :param str user_filter: Sets if the templates shown in the response Valid values are:  -owned_by_me: only shows templates the user owns.  -shared_with_me: only shows templates that are shared with the user.  -all: shows all templates owned or shared with the user.
4644        :param str user_id:
4645        :return: EnvelopeTemplateResults
4646                 If the method is called asynchronously,
4647                 returns the request thread.
4648        """
4649
4650        all_params = ['account_id', 'count', 'created_from_date', 'created_to_date', 'folder_ids', 'folder_types', 'from_date', 'include', 'is_deleted_template_only', 'is_download', 'modified_from_date', 'modified_to_date', 'order', 'order_by', 'search_fields', 'search_text', 'shared_by_me', 'start_position', 'template_ids', 'to_date', 'used_from_date', 'used_to_date', 'user_filter', 'user_id']
4651        all_params.append('callback')
4652        all_params.append('_return_http_data_only')
4653        all_params.append('_preload_content')
4654        all_params.append('_request_timeout')
4655
4656        params = locals()
4657        for key, val in iteritems(params['kwargs']):
4658            if key not in all_params:
4659                raise TypeError(
4660                    "Got an unexpected keyword argument '%s'"
4661                    " to method list_templates" % key
4662                )
4663            params[key] = val
4664        del params['kwargs']
4665        # verify the required parameter 'account_id' is set
4666        if ('account_id' not in params) or (params['account_id'] is None):
4667            raise ValueError("Missing the required parameter `account_id` when calling `list_templates`")
4668
4669
4670        collection_formats = {}
4671
4672        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
4673        path_params = {}
4674        if 'account_id' in params:
4675            path_params['accountId'] = params['account_id']
4676
4677        query_params = {}
4678        if 'count' in params:
4679            query_params['count'] = params['count']
4680        if 'created_from_date' in params:
4681            query_params['created_from_date'] = params['created_from_date']
4682        if 'created_to_date' in params:
4683            query_params['created_to_date'] = params['created_to_date']
4684        if 'folder_ids' in params:
4685            query_params['folder_ids'] = params['folder_ids']
4686        if 'folder_types' in params:
4687            query_params['folder_types'] = params['folder_types']
4688        if 'from_date' in params:
4689            query_params['from_date'] = params['from_date']
4690        if 'include' in params:
4691            query_params['include'] = params['include']
4692        if 'is_deleted_template_only' in params:
4693            query_params['is_deleted_template_only'] = params['is_deleted_template_only']
4694        if 'is_download' in params:
4695            query_params['is_download'] = params['is_download']
4696        if 'modified_from_date' in params:
4697            query_params['modified_from_date'] = params['modified_from_date']
4698        if 'modified_to_date' in params:
4699            query_params['modified_to_date'] = params['modified_to_date']
4700        if 'order' in params:
4701            query_params['order'] = params['order']
4702        if 'order_by' in params:
4703            query_params['order_by'] = params['order_by']
4704        if 'search_fields' in params:
4705            query_params['search_fields'] = params['search_fields']
4706        if 'search_text' in params:
4707            query_params['search_text'] = params['search_text']
4708        if 'shared_by_me' in params:
4709            query_params['shared_by_me'] = params['shared_by_me']
4710        if 'start_position' in params:
4711            query_params['start_position'] = params['start_position']
4712        if 'template_ids' in params:
4713            query_params['template_ids'] = params['template_ids']
4714        if 'to_date' in params:
4715            query_params['to_date'] = params['to_date']
4716        if 'used_from_date' in params:
4717            query_params['used_from_date'] = params['used_from_date']
4718        if 'used_to_date' in params:
4719            query_params['used_to_date'] = params['used_to_date']
4720        if 'user_filter' in params:
4721            query_params['user_filter'] = params['user_filter']
4722        if 'user_id' in params:
4723            query_params['user_id'] = params['user_id']
4724
4725        header_params = {}
4726
4727        form_params = []
4728        local_var_files = {}
4729
4730        body_params = None
4731        # HTTP header `Accept`
4732        header_params['Accept'] = self.api_client.\
4733            select_header_accept(['application/json'])
4734
4735        # Authentication setting
4736        auth_settings = []
4737
4738        return self.api_client.call_api(resource_path, 'GET',
4739                                        path_params,
4740                                        query_params,
4741                                        header_params,
4742                                        body=body_params,
4743                                        post_params=form_params,
4744                                        files=local_var_files,
4745                                        response_type='EnvelopeTemplateResults',
4746                                        auth_settings=auth_settings,
4747                                        callback=params.get('callback'),
4748                                        _return_http_data_only=params.get('_return_http_data_only'),
4749                                        _preload_content=params.get('_preload_content', True),
4750                                        _request_timeout=params.get('_request_timeout'),
4751                                        collection_formats=collection_formats)

Gets the definition of a template. Retrieves the list of templates for the specified account. The request can be limited to a specific folder. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_templates_with_http_info(account_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str count: Number of records to return in the cache.
  • str created_from_date:
  • str created_to_date:
  • str folder_ids: A comma separated list of folder ID GUIDs.
  • str folder_types:
  • str from_date: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
  • str include: A comma separated list of additional template attributes to include in the response. Valid values are: recipients, folders, documents, custom_fields, and notifications.
  • str is_deleted_template_only:
  • str is_download:
  • str modified_from_date:
  • str modified_to_date:
  • str order: Sets the direction order used to sort the list. Valid values are: -asc = ascending sort order (a to z) -desc = descending sort order (z to a)
  • str order_by: Sets the file attribute used to sort the list. Valid values are: -name: template name -modified: date/time template was last modified. -used: date/time the template was last used.
  • str search_fields:
  • str search_text: The search text used to search the names of templates.
  • str shared_by_me: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
  • str start_position: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
  • str template_ids:
  • str to_date: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
  • str used_from_date: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
  • str used_to_date: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
  • str user_filter: Sets if the templates shown in the response Valid values are: -owned_by_me: only shows templates the user owns. -shared_with_me: only shows templates that are shared with the user. -all: shows all templates owned or shared with the user.
  • str user_id:
Returns

EnvelopeTemplateResults If the method is called asynchronously, returns the request thread.

def rotate_document_page(self, account_id, document_id, page_number, template_id, **kwargs)
4753    def rotate_document_page(self, account_id, document_id, page_number, template_id, **kwargs):
4754        """
4755        Rotates page image from a template for display.
4756        Rotates page image from a template for display. The page image can be rotated to the left or right.
4757        This method makes a synchronous HTTP request by default. To make an
4758        asynchronous HTTP request, please define a `callback` function
4759        to be invoked when receiving the response.
4760        >>> def callback_function(response):
4761        >>>     pprint(response)
4762        >>>
4763        >>> thread = api.rotate_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
4764
4765        :param callback function: The callback function
4766            for asynchronous request. (optional)
4767        :param str account_id: The external account number (int) or account ID Guid. (required)
4768        :param str document_id: The ID of the document being accessed. (required)
4769        :param str page_number: The page number being accessed. (required)
4770        :param str template_id: The ID of the template being accessed. (required)
4771        :param PageRequest page_request:
4772        :return: None
4773                 If the method is called asynchronously,
4774                 returns the request thread.
4775        """
4776        kwargs['_return_http_data_only'] = True
4777        if kwargs.get('callback'):
4778            return self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4779        else:
4780            (data) = self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4781            return data

Rotates page image from a template for display. Rotates page image from a template for display. The page image can be rotated to the left or right. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.rotate_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str page_number: The page number being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • PageRequest page_request:
Returns

None If the method is called asynchronously, returns the request thread.

def rotate_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs)
4783    def rotate_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
4784        """
4785        Rotates page image from a template for display.
4786        Rotates page image from a template for display. The page image can be rotated to the left or right.
4787        This method makes a synchronous HTTP request by default. To make an
4788        asynchronous HTTP request, please define a `callback` function
4789        to be invoked when receiving the response.
4790        >>> def callback_function(response):
4791        >>>     pprint(response)
4792        >>>
4793        >>> thread = api.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
4794
4795        :param callback function: The callback function
4796            for asynchronous request. (optional)
4797        :param str account_id: The external account number (int) or account ID Guid. (required)
4798        :param str document_id: The ID of the document being accessed. (required)
4799        :param str page_number: The page number being accessed. (required)
4800        :param str template_id: The ID of the template being accessed. (required)
4801        :param PageRequest page_request:
4802        :return: None
4803                 If the method is called asynchronously,
4804                 returns the request thread.
4805        """
4806
4807        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request']
4808        all_params.append('callback')
4809        all_params.append('_return_http_data_only')
4810        all_params.append('_preload_content')
4811        all_params.append('_request_timeout')
4812
4813        params = locals()
4814        for key, val in iteritems(params['kwargs']):
4815            if key not in all_params:
4816                raise TypeError(
4817                    "Got an unexpected keyword argument '%s'"
4818                    " to method rotate_document_page" % key
4819                )
4820            params[key] = val
4821        del params['kwargs']
4822        # verify the required parameter 'account_id' is set
4823        if ('account_id' not in params) or (params['account_id'] is None):
4824            raise ValueError("Missing the required parameter `account_id` when calling `rotate_document_page`")
4825        # verify the required parameter 'document_id' is set
4826        if ('document_id' not in params) or (params['document_id'] is None):
4827            raise ValueError("Missing the required parameter `document_id` when calling `rotate_document_page`")
4828        # verify the required parameter 'page_number' is set
4829        if ('page_number' not in params) or (params['page_number'] is None):
4830            raise ValueError("Missing the required parameter `page_number` when calling `rotate_document_page`")
4831        # verify the required parameter 'template_id' is set
4832        if ('template_id' not in params) or (params['template_id'] is None):
4833            raise ValueError("Missing the required parameter `template_id` when calling `rotate_document_page`")
4834
4835
4836        collection_formats = {}
4837
4838        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
4839        path_params = {}
4840        if 'account_id' in params:
4841            path_params['accountId'] = params['account_id']
4842        if 'document_id' in params:
4843            path_params['documentId'] = params['document_id']
4844        if 'page_number' in params:
4845            path_params['pageNumber'] = params['page_number']
4846        if 'template_id' in params:
4847            path_params['templateId'] = params['template_id']
4848
4849        query_params = {}
4850
4851        header_params = {}
4852
4853        form_params = []
4854        local_var_files = {}
4855
4856        body_params = None
4857        if 'page_request' in params:
4858            body_params = params['page_request']
4859        # HTTP header `Accept`
4860        header_params['Accept'] = self.api_client.\
4861            select_header_accept(['application/json'])
4862
4863        # Authentication setting
4864        auth_settings = []
4865
4866        return self.api_client.call_api(resource_path, 'PUT',
4867                                        path_params,
4868                                        query_params,
4869                                        header_params,
4870                                        body=body_params,
4871                                        post_params=form_params,
4872                                        files=local_var_files,
4873                                        response_type=None,
4874                                        auth_settings=auth_settings,
4875                                        callback=params.get('callback'),
4876                                        _return_http_data_only=params.get('_return_http_data_only'),
4877                                        _preload_content=params.get('_preload_content', True),
4878                                        _request_timeout=params.get('_request_timeout'),
4879                                        collection_formats=collection_formats)

Rotates page image from a template for display. Rotates page image from a template for display. The page image can be rotated to the left or right. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str page_number: The page number being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • PageRequest page_request:
Returns

None If the method is called asynchronously, returns the request thread.

def update(self, account_id, template_id, **kwargs)
4881    def update(self, account_id, template_id, **kwargs):
4882        """
4883        Updates an existing template.
4884        Updates an existing template.
4885        This method makes a synchronous HTTP request by default. To make an
4886        asynchronous HTTP request, please define a `callback` function
4887        to be invoked when receiving the response.
4888        >>> def callback_function(response):
4889        >>>     pprint(response)
4890        >>>
4891        >>> thread = api.update(account_id, template_id, callback=callback_function)
4892
4893        :param callback function: The callback function
4894            for asynchronous request. (optional)
4895        :param str account_id: The external account number (int) or account ID Guid. (required)
4896        :param str template_id: The ID of the template being accessed. (required)
4897        :param EnvelopeTemplate envelope_template:
4898        :return: TemplateUpdateSummary
4899                 If the method is called asynchronously,
4900                 returns the request thread.
4901        """
4902        kwargs['_return_http_data_only'] = True
4903        if kwargs.get('callback'):
4904            return self.update_with_http_info(account_id, template_id, **kwargs)
4905        else:
4906            (data) = self.update_with_http_info(account_id, template_id, **kwargs)
4907            return data

Updates an existing template. Updates an existing template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • EnvelopeTemplate envelope_template:
Returns

TemplateUpdateSummary If the method is called asynchronously, returns the request thread.

def update_with_http_info(self, account_id, template_id, **kwargs)
4909    def update_with_http_info(self, account_id, template_id, **kwargs):
4910        """
4911        Updates an existing template.
4912        Updates an existing template.
4913        This method makes a synchronous HTTP request by default. To make an
4914        asynchronous HTTP request, please define a `callback` function
4915        to be invoked when receiving the response.
4916        >>> def callback_function(response):
4917        >>>     pprint(response)
4918        >>>
4919        >>> thread = api.update_with_http_info(account_id, template_id, callback=callback_function)
4920
4921        :param callback function: The callback function
4922            for asynchronous request. (optional)
4923        :param str account_id: The external account number (int) or account ID Guid. (required)
4924        :param str template_id: The ID of the template being accessed. (required)
4925        :param EnvelopeTemplate envelope_template:
4926        :return: TemplateUpdateSummary
4927                 If the method is called asynchronously,
4928                 returns the request thread.
4929        """
4930
4931        all_params = ['account_id', 'template_id', 'envelope_template']
4932        all_params.append('callback')
4933        all_params.append('_return_http_data_only')
4934        all_params.append('_preload_content')
4935        all_params.append('_request_timeout')
4936
4937        params = locals()
4938        for key, val in iteritems(params['kwargs']):
4939            if key not in all_params:
4940                raise TypeError(
4941                    "Got an unexpected keyword argument '%s'"
4942                    " to method update" % key
4943                )
4944            params[key] = val
4945        del params['kwargs']
4946        # verify the required parameter 'account_id' is set
4947        if ('account_id' not in params) or (params['account_id'] is None):
4948            raise ValueError("Missing the required parameter `account_id` when calling `update`")
4949        # verify the required parameter 'template_id' is set
4950        if ('template_id' not in params) or (params['template_id'] is None):
4951            raise ValueError("Missing the required parameter `template_id` when calling `update`")
4952
4953
4954        collection_formats = {}
4955
4956        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json')
4957        path_params = {}
4958        if 'account_id' in params:
4959            path_params['accountId'] = params['account_id']
4960        if 'template_id' in params:
4961            path_params['templateId'] = params['template_id']
4962
4963        query_params = {}
4964
4965        header_params = {}
4966
4967        form_params = []
4968        local_var_files = {}
4969
4970        body_params = None
4971        if 'envelope_template' in params:
4972            body_params = params['envelope_template']
4973        # HTTP header `Accept`
4974        header_params['Accept'] = self.api_client.\
4975            select_header_accept(['application/json'])
4976
4977        # Authentication setting
4978        auth_settings = []
4979
4980        return self.api_client.call_api(resource_path, 'PUT',
4981                                        path_params,
4982                                        query_params,
4983                                        header_params,
4984                                        body=body_params,
4985                                        post_params=form_params,
4986                                        files=local_var_files,
4987                                        response_type='TemplateUpdateSummary',
4988                                        auth_settings=auth_settings,
4989                                        callback=params.get('callback'),
4990                                        _return_http_data_only=params.get('_return_http_data_only'),
4991                                        _preload_content=params.get('_preload_content', True),
4992                                        _request_timeout=params.get('_request_timeout'),
4993                                        collection_formats=collection_formats)

Updates an existing template. Updates an existing template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • EnvelopeTemplate envelope_template:
Returns

TemplateUpdateSummary If the method is called asynchronously, returns the request thread.

def update_custom_fields(self, account_id, template_id, **kwargs)
4995    def update_custom_fields(self, account_id, template_id, **kwargs):
4996        """
4997        Updates envelope custom fields in a template.
4998        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
4999        This method makes a synchronous HTTP request by default. To make an
5000        asynchronous HTTP request, please define a `callback` function
5001        to be invoked when receiving the response.
5002        >>> def callback_function(response):
5003        >>>     pprint(response)
5004        >>>
5005        >>> thread = api.update_custom_fields(account_id, template_id, callback=callback_function)
5006
5007        :param callback function: The callback function
5008            for asynchronous request. (optional)
5009        :param str account_id: The external account number (int) or account ID Guid. (required)
5010        :param str template_id: The ID of the template being accessed. (required)
5011        :param TemplateCustomFields template_custom_fields:
5012        :return: CustomFields
5013                 If the method is called asynchronously,
5014                 returns the request thread.
5015        """
5016        kwargs['_return_http_data_only'] = True
5017        if kwargs.get('callback'):
5018            return self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
5019        else:
5020            (data) = self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
5021            return data

Updates envelope custom fields in a template. Updates the custom fields in a template. Each custom field used in a template must have a unique name. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_custom_fields(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateCustomFields template_custom_fields:
Returns

CustomFields If the method is called asynchronously, returns the request thread.

def update_custom_fields_with_http_info(self, account_id, template_id, **kwargs)
5023    def update_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
5024        """
5025        Updates envelope custom fields in a template.
5026        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
5027        This method makes a synchronous HTTP request by default. To make an
5028        asynchronous HTTP request, please define a `callback` function
5029        to be invoked when receiving the response.
5030        >>> def callback_function(response):
5031        >>>     pprint(response)
5032        >>>
5033        >>> thread = api.update_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
5034
5035        :param callback function: The callback function
5036            for asynchronous request. (optional)
5037        :param str account_id: The external account number (int) or account ID Guid. (required)
5038        :param str template_id: The ID of the template being accessed. (required)
5039        :param TemplateCustomFields template_custom_fields:
5040        :return: CustomFields
5041                 If the method is called asynchronously,
5042                 returns the request thread.
5043        """
5044
5045        all_params = ['account_id', 'template_id', 'template_custom_fields']
5046        all_params.append('callback')
5047        all_params.append('_return_http_data_only')
5048        all_params.append('_preload_content')
5049        all_params.append('_request_timeout')
5050
5051        params = locals()
5052        for key, val in iteritems(params['kwargs']):
5053            if key not in all_params:
5054                raise TypeError(
5055                    "Got an unexpected keyword argument '%s'"
5056                    " to method update_custom_fields" % key
5057                )
5058            params[key] = val
5059        del params['kwargs']
5060        # verify the required parameter 'account_id' is set
5061        if ('account_id' not in params) or (params['account_id'] is None):
5062            raise ValueError("Missing the required parameter `account_id` when calling `update_custom_fields`")
5063        # verify the required parameter 'template_id' is set
5064        if ('template_id' not in params) or (params['template_id'] is None):
5065            raise ValueError("Missing the required parameter `template_id` when calling `update_custom_fields`")
5066
5067
5068        collection_formats = {}
5069
5070        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
5071        path_params = {}
5072        if 'account_id' in params:
5073            path_params['accountId'] = params['account_id']
5074        if 'template_id' in params:
5075            path_params['templateId'] = params['template_id']
5076
5077        query_params = {}
5078
5079        header_params = {}
5080
5081        form_params = []
5082        local_var_files = {}
5083
5084        body_params = None
5085        if 'template_custom_fields' in params:
5086            body_params = params['template_custom_fields']
5087        # HTTP header `Accept`
5088        header_params['Accept'] = self.api_client.\
5089            select_header_accept(['application/json'])
5090
5091        # Authentication setting
5092        auth_settings = []
5093
5094        return self.api_client.call_api(resource_path, 'PUT',
5095                                        path_params,
5096                                        query_params,
5097                                        header_params,
5098                                        body=body_params,
5099                                        post_params=form_params,
5100                                        files=local_var_files,
5101                                        response_type='CustomFields',
5102                                        auth_settings=auth_settings,
5103                                        callback=params.get('callback'),
5104                                        _return_http_data_only=params.get('_return_http_data_only'),
5105                                        _preload_content=params.get('_preload_content', True),
5106                                        _request_timeout=params.get('_request_timeout'),
5107                                        collection_formats=collection_formats)

Updates envelope custom fields in a template. Updates the custom fields in a template. Each custom field used in a template must have a unique name. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateCustomFields template_custom_fields:
Returns

CustomFields If the method is called asynchronously, returns the request thread.

def update_document(self, account_id, document_id, template_id, **kwargs)
5109    def update_document(self, account_id, document_id, template_id, **kwargs):
5110        """
5111        Adds a document to a template document.
5112        Adds the specified document to an existing template document.
5113        This method makes a synchronous HTTP request by default. To make an
5114        asynchronous HTTP request, please define a `callback` function
5115        to be invoked when receiving the response.
5116        >>> def callback_function(response):
5117        >>>     pprint(response)
5118        >>>
5119        >>> thread = api.update_document(account_id, document_id, template_id, callback=callback_function)
5120
5121        :param callback function: The callback function
5122            for asynchronous request. (optional)
5123        :param str account_id: The external account number (int) or account ID Guid. (required)
5124        :param str document_id: The ID of the document being accessed. (required)
5125        :param str template_id: The ID of the template being accessed. (required)
5126        :param str is_envelope_definition:
5127        :param EnvelopeDefinition envelope_definition:
5128        :return: EnvelopeDocument
5129                 If the method is called asynchronously,
5130                 returns the request thread.
5131        """
5132        kwargs['_return_http_data_only'] = True
5133        if kwargs.get('callback'):
5134            return self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
5135        else:
5136            (data) = self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
5137            return data

Adds a document to a template document. Adds the specified document to an existing template document. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_document(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str is_envelope_definition:
  • EnvelopeDefinition envelope_definition:
Returns

EnvelopeDocument If the method is called asynchronously, returns the request thread.

def update_document_with_http_info(self, account_id, document_id, template_id, **kwargs)
5139    def update_document_with_http_info(self, account_id, document_id, template_id, **kwargs):
5140        """
5141        Adds a document to a template document.
5142        Adds the specified document to an existing template document.
5143        This method makes a synchronous HTTP request by default. To make an
5144        asynchronous HTTP request, please define a `callback` function
5145        to be invoked when receiving the response.
5146        >>> def callback_function(response):
5147        >>>     pprint(response)
5148        >>>
5149        >>> thread = api.update_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
5150
5151        :param callback function: The callback function
5152            for asynchronous request. (optional)
5153        :param str account_id: The external account number (int) or account ID Guid. (required)
5154        :param str document_id: The ID of the document being accessed. (required)
5155        :param str template_id: The ID of the template being accessed. (required)
5156        :param str is_envelope_definition:
5157        :param EnvelopeDefinition envelope_definition:
5158        :return: EnvelopeDocument
5159                 If the method is called asynchronously,
5160                 returns the request thread.
5161        """
5162
5163        all_params = ['account_id', 'document_id', 'template_id', 'is_envelope_definition', 'envelope_definition']
5164        all_params.append('callback')
5165        all_params.append('_return_http_data_only')
5166        all_params.append('_preload_content')
5167        all_params.append('_request_timeout')
5168
5169        params = locals()
5170        for key, val in iteritems(params['kwargs']):
5171            if key not in all_params:
5172                raise TypeError(
5173                    "Got an unexpected keyword argument '%s'"
5174                    " to method update_document" % key
5175                )
5176            params[key] = val
5177        del params['kwargs']
5178        # verify the required parameter 'account_id' is set
5179        if ('account_id' not in params) or (params['account_id'] is None):
5180            raise ValueError("Missing the required parameter `account_id` when calling `update_document`")
5181        # verify the required parameter 'document_id' is set
5182        if ('document_id' not in params) or (params['document_id'] is None):
5183            raise ValueError("Missing the required parameter `document_id` when calling `update_document`")
5184        # verify the required parameter 'template_id' is set
5185        if ('template_id' not in params) or (params['template_id'] is None):
5186            raise ValueError("Missing the required parameter `template_id` when calling `update_document`")
5187
5188
5189        collection_formats = {}
5190
5191        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
5192        path_params = {}
5193        if 'account_id' in params:
5194            path_params['accountId'] = params['account_id']
5195        if 'document_id' in params:
5196            path_params['documentId'] = params['document_id']
5197        if 'template_id' in params:
5198            path_params['templateId'] = params['template_id']
5199
5200        query_params = {}
5201        if 'is_envelope_definition' in params:
5202            query_params['is_envelope_definition'] = params['is_envelope_definition']
5203
5204        header_params = {}
5205
5206        form_params = []
5207        local_var_files = {}
5208
5209        body_params = None
5210        if 'envelope_definition' in params:
5211            body_params = params['envelope_definition']
5212        # HTTP header `Accept`
5213        header_params['Accept'] = self.api_client.\
5214            select_header_accept(['application/json'])
5215
5216        # Authentication setting
5217        auth_settings = []
5218
5219        return self.api_client.call_api(resource_path, 'PUT',
5220                                        path_params,
5221                                        query_params,
5222                                        header_params,
5223                                        body=body_params,
5224                                        post_params=form_params,
5225                                        files=local_var_files,
5226                                        response_type='EnvelopeDocument',
5227                                        auth_settings=auth_settings,
5228                                        callback=params.get('callback'),
5229                                        _return_http_data_only=params.get('_return_http_data_only'),
5230                                        _preload_content=params.get('_preload_content', True),
5231                                        _request_timeout=params.get('_request_timeout'),
5232                                        collection_formats=collection_formats)

Adds a document to a template document. Adds the specified document to an existing template document. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str is_envelope_definition:
  • EnvelopeDefinition envelope_definition:
Returns

EnvelopeDocument If the method is called asynchronously, returns the request thread.

def update_document_fields(self, account_id, document_id, template_id, **kwargs)
5234    def update_document_fields(self, account_id, document_id, template_id, **kwargs):
5235        """
5236        Updates existing custom document fields in an existing template document.
5237        Updates existing custom document fields in an existing template document.
5238        This method makes a synchronous HTTP request by default. To make an
5239        asynchronous HTTP request, please define a `callback` function
5240        to be invoked when receiving the response.
5241        >>> def callback_function(response):
5242        >>>     pprint(response)
5243        >>>
5244        >>> thread = api.update_document_fields(account_id, document_id, template_id, callback=callback_function)
5245
5246        :param callback function: The callback function
5247            for asynchronous request. (optional)
5248        :param str account_id: The external account number (int) or account ID Guid. (required)
5249        :param str document_id: The ID of the document being accessed. (required)
5250        :param str template_id: The ID of the template being accessed. (required)
5251        :param DocumentFieldsInformation document_fields_information:
5252        :return: DocumentFieldsInformation
5253                 If the method is called asynchronously,
5254                 returns the request thread.
5255        """
5256        kwargs['_return_http_data_only'] = True
5257        if kwargs.get('callback'):
5258            return self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5259        else:
5260            (data) = self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5261            return data

Updates existing custom document fields in an existing template document. Updates existing custom document fields in an existing template document. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_document_fields(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentFieldsInformation document_fields_information:
Returns

DocumentFieldsInformation If the method is called asynchronously, returns the request thread.

def update_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs)
5263    def update_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
5264        """
5265        Updates existing custom document fields in an existing template document.
5266        Updates existing custom document fields in an existing template document.
5267        This method makes a synchronous HTTP request by default. To make an
5268        asynchronous HTTP request, please define a `callback` function
5269        to be invoked when receiving the response.
5270        >>> def callback_function(response):
5271        >>>     pprint(response)
5272        >>>
5273        >>> thread = api.update_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
5274
5275        :param callback function: The callback function
5276            for asynchronous request. (optional)
5277        :param str account_id: The external account number (int) or account ID Guid. (required)
5278        :param str document_id: The ID of the document being accessed. (required)
5279        :param str template_id: The ID of the template being accessed. (required)
5280        :param DocumentFieldsInformation document_fields_information:
5281        :return: DocumentFieldsInformation
5282                 If the method is called asynchronously,
5283                 returns the request thread.
5284        """
5285
5286        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
5287        all_params.append('callback')
5288        all_params.append('_return_http_data_only')
5289        all_params.append('_preload_content')
5290        all_params.append('_request_timeout')
5291
5292        params = locals()
5293        for key, val in iteritems(params['kwargs']):
5294            if key not in all_params:
5295                raise TypeError(
5296                    "Got an unexpected keyword argument '%s'"
5297                    " to method update_document_fields" % key
5298                )
5299            params[key] = val
5300        del params['kwargs']
5301        # verify the required parameter 'account_id' is set
5302        if ('account_id' not in params) or (params['account_id'] is None):
5303            raise ValueError("Missing the required parameter `account_id` when calling `update_document_fields`")
5304        # verify the required parameter 'document_id' is set
5305        if ('document_id' not in params) or (params['document_id'] is None):
5306            raise ValueError("Missing the required parameter `document_id` when calling `update_document_fields`")
5307        # verify the required parameter 'template_id' is set
5308        if ('template_id' not in params) or (params['template_id'] is None):
5309            raise ValueError("Missing the required parameter `template_id` when calling `update_document_fields`")
5310
5311
5312        collection_formats = {}
5313
5314        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
5315        path_params = {}
5316        if 'account_id' in params:
5317            path_params['accountId'] = params['account_id']
5318        if 'document_id' in params:
5319            path_params['documentId'] = params['document_id']
5320        if 'template_id' in params:
5321            path_params['templateId'] = params['template_id']
5322
5323        query_params = {}
5324
5325        header_params = {}
5326
5327        form_params = []
5328        local_var_files = {}
5329
5330        body_params = None
5331        if 'document_fields_information' in params:
5332            body_params = params['document_fields_information']
5333        # HTTP header `Accept`
5334        header_params['Accept'] = self.api_client.\
5335            select_header_accept(['application/json'])
5336
5337        # Authentication setting
5338        auth_settings = []
5339
5340        return self.api_client.call_api(resource_path, 'PUT',
5341                                        path_params,
5342                                        query_params,
5343                                        header_params,
5344                                        body=body_params,
5345                                        post_params=form_params,
5346                                        files=local_var_files,
5347                                        response_type='DocumentFieldsInformation',
5348                                        auth_settings=auth_settings,
5349                                        callback=params.get('callback'),
5350                                        _return_http_data_only=params.get('_return_http_data_only'),
5351                                        _preload_content=params.get('_preload_content', True),
5352                                        _request_timeout=params.get('_request_timeout'),
5353                                        collection_formats=collection_formats)

Updates existing custom document fields in an existing template document. Updates existing custom document fields in an existing template document. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentFieldsInformation document_fields_information:
Returns

DocumentFieldsInformation If the method is called asynchronously, returns the request thread.

def update_documents(self, account_id, template_id, **kwargs)
5355    def update_documents(self, account_id, template_id, **kwargs):
5356        """
5357        Adds documents to a template document.
5358        Adds one or more documents to an existing template document.
5359        This method makes a synchronous HTTP request by default. To make an
5360        asynchronous HTTP request, please define a `callback` function
5361        to be invoked when receiving the response.
5362        >>> def callback_function(response):
5363        >>>     pprint(response)
5364        >>>
5365        >>> thread = api.update_documents(account_id, template_id, callback=callback_function)
5366
5367        :param callback function: The callback function
5368            for asynchronous request. (optional)
5369        :param str account_id: The external account number (int) or account ID Guid. (required)
5370        :param str template_id: The ID of the template being accessed. (required)
5371        :param EnvelopeDefinition envelope_definition:
5372        :return: TemplateDocumentsResult
5373                 If the method is called asynchronously,
5374                 returns the request thread.
5375        """
5376        kwargs['_return_http_data_only'] = True
5377        if kwargs.get('callback'):
5378            return self.update_documents_with_http_info(account_id, template_id, **kwargs)
5379        else:
5380            (data) = self.update_documents_with_http_info(account_id, template_id, **kwargs)
5381            return data

Adds documents to a template document. Adds one or more documents to an existing template document. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_documents(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • EnvelopeDefinition envelope_definition:
Returns

TemplateDocumentsResult If the method is called asynchronously, returns the request thread.

def update_documents_with_http_info(self, account_id, template_id, **kwargs)
5383    def update_documents_with_http_info(self, account_id, template_id, **kwargs):
5384        """
5385        Adds documents to a template document.
5386        Adds one or more documents to an existing template document.
5387        This method makes a synchronous HTTP request by default. To make an
5388        asynchronous HTTP request, please define a `callback` function
5389        to be invoked when receiving the response.
5390        >>> def callback_function(response):
5391        >>>     pprint(response)
5392        >>>
5393        >>> thread = api.update_documents_with_http_info(account_id, template_id, callback=callback_function)
5394
5395        :param callback function: The callback function
5396            for asynchronous request. (optional)
5397        :param str account_id: The external account number (int) or account ID Guid. (required)
5398        :param str template_id: The ID of the template being accessed. (required)
5399        :param EnvelopeDefinition envelope_definition:
5400        :return: TemplateDocumentsResult
5401                 If the method is called asynchronously,
5402                 returns the request thread.
5403        """
5404
5405        all_params = ['account_id', 'template_id', 'envelope_definition']
5406        all_params.append('callback')
5407        all_params.append('_return_http_data_only')
5408        all_params.append('_preload_content')
5409        all_params.append('_request_timeout')
5410
5411        params = locals()
5412        for key, val in iteritems(params['kwargs']):
5413            if key not in all_params:
5414                raise TypeError(
5415                    "Got an unexpected keyword argument '%s'"
5416                    " to method update_documents" % key
5417                )
5418            params[key] = val
5419        del params['kwargs']
5420        # verify the required parameter 'account_id' is set
5421        if ('account_id' not in params) or (params['account_id'] is None):
5422            raise ValueError("Missing the required parameter `account_id` when calling `update_documents`")
5423        # verify the required parameter 'template_id' is set
5424        if ('template_id' not in params) or (params['template_id'] is None):
5425            raise ValueError("Missing the required parameter `template_id` when calling `update_documents`")
5426
5427
5428        collection_formats = {}
5429
5430        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
5431        path_params = {}
5432        if 'account_id' in params:
5433            path_params['accountId'] = params['account_id']
5434        if 'template_id' in params:
5435            path_params['templateId'] = params['template_id']
5436
5437        query_params = {}
5438
5439        header_params = {}
5440
5441        form_params = []
5442        local_var_files = {}
5443
5444        body_params = None
5445        if 'envelope_definition' in params:
5446            body_params = params['envelope_definition']
5447        # HTTP header `Accept`
5448        header_params['Accept'] = self.api_client.\
5449            select_header_accept(['application/json'])
5450
5451        # Authentication setting
5452        auth_settings = []
5453
5454        return self.api_client.call_api(resource_path, 'PUT',
5455                                        path_params,
5456                                        query_params,
5457                                        header_params,
5458                                        body=body_params,
5459                                        post_params=form_params,
5460                                        files=local_var_files,
5461                                        response_type='TemplateDocumentsResult',
5462                                        auth_settings=auth_settings,
5463                                        callback=params.get('callback'),
5464                                        _return_http_data_only=params.get('_return_http_data_only'),
5465                                        _preload_content=params.get('_preload_content', True),
5466                                        _request_timeout=params.get('_request_timeout'),
5467                                        collection_formats=collection_formats)

Adds documents to a template document. Adds one or more documents to an existing template document. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_documents_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • EnvelopeDefinition envelope_definition:
Returns

TemplateDocumentsResult If the method is called asynchronously, returns the request thread.

def update_group_share(self, account_id, template_id, template_part, **kwargs)
5469    def update_group_share(self, account_id, template_id, template_part, **kwargs):
5470        """
5471        Shares a template with a group
5472        Shares a template with the specified members group.
5473        This method makes a synchronous HTTP request by default. To make an
5474        asynchronous HTTP request, please define a `callback` function
5475        to be invoked when receiving the response.
5476        >>> def callback_function(response):
5477        >>>     pprint(response)
5478        >>>
5479        >>> thread = api.update_group_share(account_id, template_id, template_part, callback=callback_function)
5480
5481        :param callback function: The callback function
5482            for asynchronous request. (optional)
5483        :param str account_id: The external account number (int) or account ID Guid. (required)
5484        :param str template_id: The ID of the template being accessed. (required)
5485        :param str template_part: Currently, the only defined part is **groups**. (required)
5486        :param GroupInformation group_information:
5487        :return: GroupInformation
5488                 If the method is called asynchronously,
5489                 returns the request thread.
5490        """
5491        kwargs['_return_http_data_only'] = True
5492        if kwargs.get('callback'):
5493            return self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5494        else:
5495            (data) = self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5496            return data

Shares a template with a group Shares a template with the specified members group. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_group_share(account_id, template_id, template_part, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str template_part: Currently, the only defined part is groups. (required)
  • GroupInformation group_information:
Returns

GroupInformation If the method is called asynchronously, returns the request thread.

def update_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs)
5498    def update_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs):
5499        """
5500        Shares a template with a group
5501        Shares a template with the specified members group.
5502        This method makes a synchronous HTTP request by default. To make an
5503        asynchronous HTTP request, please define a `callback` function
5504        to be invoked when receiving the response.
5505        >>> def callback_function(response):
5506        >>>     pprint(response)
5507        >>>
5508        >>> thread = api.update_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
5509
5510        :param callback function: The callback function
5511            for asynchronous request. (optional)
5512        :param str account_id: The external account number (int) or account ID Guid. (required)
5513        :param str template_id: The ID of the template being accessed. (required)
5514        :param str template_part: Currently, the only defined part is **groups**. (required)
5515        :param GroupInformation group_information:
5516        :return: GroupInformation
5517                 If the method is called asynchronously,
5518                 returns the request thread.
5519        """
5520
5521        all_params = ['account_id', 'template_id', 'template_part', 'group_information']
5522        all_params.append('callback')
5523        all_params.append('_return_http_data_only')
5524        all_params.append('_preload_content')
5525        all_params.append('_request_timeout')
5526
5527        params = locals()
5528        for key, val in iteritems(params['kwargs']):
5529            if key not in all_params:
5530                raise TypeError(
5531                    "Got an unexpected keyword argument '%s'"
5532                    " to method update_group_share" % key
5533                )
5534            params[key] = val
5535        del params['kwargs']
5536        # verify the required parameter 'account_id' is set
5537        if ('account_id' not in params) or (params['account_id'] is None):
5538            raise ValueError("Missing the required parameter `account_id` when calling `update_group_share`")
5539        # verify the required parameter 'template_id' is set
5540        if ('template_id' not in params) or (params['template_id'] is None):
5541            raise ValueError("Missing the required parameter `template_id` when calling `update_group_share`")
5542        # verify the required parameter 'template_part' is set
5543        if ('template_part' not in params) or (params['template_part'] is None):
5544            raise ValueError("Missing the required parameter `template_part` when calling `update_group_share`")
5545
5546
5547        collection_formats = {}
5548
5549        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json')
5550        path_params = {}
5551        if 'account_id' in params:
5552            path_params['accountId'] = params['account_id']
5553        if 'template_id' in params:
5554            path_params['templateId'] = params['template_id']
5555        if 'template_part' in params:
5556            path_params['templatePart'] = params['template_part']
5557
5558        query_params = {}
5559
5560        header_params = {}
5561
5562        form_params = []
5563        local_var_files = {}
5564
5565        body_params = None
5566        if 'group_information' in params:
5567            body_params = params['group_information']
5568        # HTTP header `Accept`
5569        header_params['Accept'] = self.api_client.\
5570            select_header_accept(['application/json'])
5571
5572        # Authentication setting
5573        auth_settings = []
5574
5575        return self.api_client.call_api(resource_path, 'PUT',
5576                                        path_params,
5577                                        query_params,
5578                                        header_params,
5579                                        body=body_params,
5580                                        post_params=form_params,
5581                                        files=local_var_files,
5582                                        response_type='GroupInformation',
5583                                        auth_settings=auth_settings,
5584                                        callback=params.get('callback'),
5585                                        _return_http_data_only=params.get('_return_http_data_only'),
5586                                        _preload_content=params.get('_preload_content', True),
5587                                        _request_timeout=params.get('_request_timeout'),
5588                                        collection_formats=collection_formats)

Shares a template with a group Shares a template with the specified members group. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str template_part: Currently, the only defined part is groups. (required)
  • GroupInformation group_information:
Returns

GroupInformation If the method is called asynchronously, returns the request thread.

def update_lock(self, account_id, template_id, **kwargs)
5590    def update_lock(self, account_id, template_id, **kwargs):
5591        """
5592        Updates a template lock.
5593        Updates the lock duration time or update the `lockedByApp` property information for the specified template. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated.
5594        This method makes a synchronous HTTP request by default. To make an
5595        asynchronous HTTP request, please define a `callback` function
5596        to be invoked when receiving the response.
5597        >>> def callback_function(response):
5598        >>>     pprint(response)
5599        >>>
5600        >>> thread = api.update_lock(account_id, template_id, callback=callback_function)
5601
5602        :param callback function: The callback function
5603            for asynchronous request. (optional)
5604        :param str account_id: The external account number (int) or account ID Guid. (required)
5605        :param str template_id: The ID of the template being accessed. (required)
5606        :param LockRequest lock_request:
5607        :return: LockInformation
5608                 If the method is called asynchronously,
5609                 returns the request thread.
5610        """
5611        kwargs['_return_http_data_only'] = True
5612        if kwargs.get('callback'):
5613            return self.update_lock_with_http_info(account_id, template_id, **kwargs)
5614        else:
5615            (data) = self.update_lock_with_http_info(account_id, template_id, **kwargs)
5616            return data

Updates a template lock. Updates the lock duration time or update the lockedByApp property information for the specified template. The user and integrator key must match the user specified by the lockByUser property and integrator key information and the X-DocuSign-Edit header must be included or an error will be generated. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_lock(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • LockRequest lock_request:
Returns

LockInformation If the method is called asynchronously, returns the request thread.

def update_lock_with_http_info(self, account_id, template_id, **kwargs)
5618    def update_lock_with_http_info(self, account_id, template_id, **kwargs):
5619        """
5620        Updates a template lock.
5621        Updates the lock duration time or update the `lockedByApp` property information for the specified template. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated.
5622        This method makes a synchronous HTTP request by default. To make an
5623        asynchronous HTTP request, please define a `callback` function
5624        to be invoked when receiving the response.
5625        >>> def callback_function(response):
5626        >>>     pprint(response)
5627        >>>
5628        >>> thread = api.update_lock_with_http_info(account_id, template_id, callback=callback_function)
5629
5630        :param callback function: The callback function
5631            for asynchronous request. (optional)
5632        :param str account_id: The external account number (int) or account ID Guid. (required)
5633        :param str template_id: The ID of the template being accessed. (required)
5634        :param LockRequest lock_request:
5635        :return: LockInformation
5636                 If the method is called asynchronously,
5637                 returns the request thread.
5638        """
5639
5640        all_params = ['account_id', 'template_id', 'lock_request']
5641        all_params.append('callback')
5642        all_params.append('_return_http_data_only')
5643        all_params.append('_preload_content')
5644        all_params.append('_request_timeout')
5645
5646        params = locals()
5647        for key, val in iteritems(params['kwargs']):
5648            if key not in all_params:
5649                raise TypeError(
5650                    "Got an unexpected keyword argument '%s'"
5651                    " to method update_lock" % key
5652                )
5653            params[key] = val
5654        del params['kwargs']
5655        # verify the required parameter 'account_id' is set
5656        if ('account_id' not in params) or (params['account_id'] is None):
5657            raise ValueError("Missing the required parameter `account_id` when calling `update_lock`")
5658        # verify the required parameter 'template_id' is set
5659        if ('template_id' not in params) or (params['template_id'] is None):
5660            raise ValueError("Missing the required parameter `template_id` when calling `update_lock`")
5661
5662
5663        collection_formats = {}
5664
5665        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
5666        path_params = {}
5667        if 'account_id' in params:
5668            path_params['accountId'] = params['account_id']
5669        if 'template_id' in params:
5670            path_params['templateId'] = params['template_id']
5671
5672        query_params = {}
5673
5674        header_params = {}
5675
5676        form_params = []
5677        local_var_files = {}
5678
5679        body_params = None
5680        if 'lock_request' in params:
5681            body_params = params['lock_request']
5682        # HTTP header `Accept`
5683        header_params['Accept'] = self.api_client.\
5684            select_header_accept(['application/json'])
5685
5686        # Authentication setting
5687        auth_settings = []
5688
5689        return self.api_client.call_api(resource_path, 'PUT',
5690                                        path_params,
5691                                        query_params,
5692                                        header_params,
5693                                        body=body_params,
5694                                        post_params=form_params,
5695                                        files=local_var_files,
5696                                        response_type='LockInformation',
5697                                        auth_settings=auth_settings,
5698                                        callback=params.get('callback'),
5699                                        _return_http_data_only=params.get('_return_http_data_only'),
5700                                        _preload_content=params.get('_preload_content', True),
5701                                        _request_timeout=params.get('_request_timeout'),
5702                                        collection_formats=collection_formats)

Updates a template lock. Updates the lock duration time or update the lockedByApp property information for the specified template. The user and integrator key must match the user specified by the lockByUser property and integrator key information and the X-DocuSign-Edit header must be included or an error will be generated. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_lock_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • LockRequest lock_request:
Returns

LockInformation If the method is called asynchronously, returns the request thread.

def update_notification_settings(self, account_id, template_id, **kwargs)
5704    def update_notification_settings(self, account_id, template_id, **kwargs):
5705        """
5706        Updates the notification  structure for an existing template.
5707        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5708        This method makes a synchronous HTTP request by default. To make an
5709        asynchronous HTTP request, please define a `callback` function
5710        to be invoked when receiving the response.
5711        >>> def callback_function(response):
5712        >>>     pprint(response)
5713        >>>
5714        >>> thread = api.update_notification_settings(account_id, template_id, callback=callback_function)
5715
5716        :param callback function: The callback function
5717            for asynchronous request. (optional)
5718        :param str account_id: The external account number (int) or account ID Guid. (required)
5719        :param str template_id: The ID of the template being accessed. (required)
5720        :param TemplateNotificationRequest template_notification_request:
5721        :return: Notification
5722                 If the method is called asynchronously,
5723                 returns the request thread.
5724        """
5725        kwargs['_return_http_data_only'] = True
5726        if kwargs.get('callback'):
5727            return self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5728        else:
5729            (data) = self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5730            return data

Updates the notification structure for an existing template. Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_notification_settings(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateNotificationRequest template_notification_request:
Returns

Notification If the method is called asynchronously, returns the request thread.

def update_notification_settings_with_http_info(self, account_id, template_id, **kwargs)
5732    def update_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
5733        """
5734        Updates the notification  structure for an existing template.
5735        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5736        This method makes a synchronous HTTP request by default. To make an
5737        asynchronous HTTP request, please define a `callback` function
5738        to be invoked when receiving the response.
5739        >>> def callback_function(response):
5740        >>>     pprint(response)
5741        >>>
5742        >>> thread = api.update_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
5743
5744        :param callback function: The callback function
5745            for asynchronous request. (optional)
5746        :param str account_id: The external account number (int) or account ID Guid. (required)
5747        :param str template_id: The ID of the template being accessed. (required)
5748        :param TemplateNotificationRequest template_notification_request:
5749        :return: Notification
5750                 If the method is called asynchronously,
5751                 returns the request thread.
5752        """
5753
5754        all_params = ['account_id', 'template_id', 'template_notification_request']
5755        all_params.append('callback')
5756        all_params.append('_return_http_data_only')
5757        all_params.append('_preload_content')
5758        all_params.append('_request_timeout')
5759
5760        params = locals()
5761        for key, val in iteritems(params['kwargs']):
5762            if key not in all_params:
5763                raise TypeError(
5764                    "Got an unexpected keyword argument '%s'"
5765                    " to method update_notification_settings" % key
5766                )
5767            params[key] = val
5768        del params['kwargs']
5769        # verify the required parameter 'account_id' is set
5770        if ('account_id' not in params) or (params['account_id'] is None):
5771            raise ValueError("Missing the required parameter `account_id` when calling `update_notification_settings`")
5772        # verify the required parameter 'template_id' is set
5773        if ('template_id' not in params) or (params['template_id'] is None):
5774            raise ValueError("Missing the required parameter `template_id` when calling `update_notification_settings`")
5775
5776
5777        collection_formats = {}
5778
5779        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
5780        path_params = {}
5781        if 'account_id' in params:
5782            path_params['accountId'] = params['account_id']
5783        if 'template_id' in params:
5784            path_params['templateId'] = params['template_id']
5785
5786        query_params = {}
5787
5788        header_params = {}
5789
5790        form_params = []
5791        local_var_files = {}
5792
5793        body_params = None
5794        if 'template_notification_request' in params:
5795            body_params = params['template_notification_request']
5796        # HTTP header `Accept`
5797        header_params['Accept'] = self.api_client.\
5798            select_header_accept(['application/json'])
5799
5800        # Authentication setting
5801        auth_settings = []
5802
5803        return self.api_client.call_api(resource_path, 'PUT',
5804                                        path_params,
5805                                        query_params,
5806                                        header_params,
5807                                        body=body_params,
5808                                        post_params=form_params,
5809                                        files=local_var_files,
5810                                        response_type='Notification',
5811                                        auth_settings=auth_settings,
5812                                        callback=params.get('callback'),
5813                                        _return_http_data_only=params.get('_return_http_data_only'),
5814                                        _preload_content=params.get('_preload_content', True),
5815                                        _request_timeout=params.get('_request_timeout'),
5816                                        collection_formats=collection_formats)

Updates the notification structure for an existing template. Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateNotificationRequest template_notification_request:
Returns

Notification If the method is called asynchronously, returns the request thread.

def update_recipients(self, account_id, template_id, **kwargs)
5818    def update_recipients(self, account_id, template_id, **kwargs):
5819        """
5820        Updates recipients in a template.
5821        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5822        This method makes a synchronous HTTP request by default. To make an
5823        asynchronous HTTP request, please define a `callback` function
5824        to be invoked when receiving the response.
5825        >>> def callback_function(response):
5826        >>>     pprint(response)
5827        >>>
5828        >>> thread = api.update_recipients(account_id, template_id, callback=callback_function)
5829
5830        :param callback function: The callback function
5831            for asynchronous request. (optional)
5832        :param str account_id: The external account number (int) or account ID Guid. (required)
5833        :param str template_id: The ID of the template being accessed. (required)
5834        :param str resend_envelope:
5835        :param TemplateRecipients template_recipients:
5836        :return: RecipientsUpdateSummary
5837                 If the method is called asynchronously,
5838                 returns the request thread.
5839        """
5840        kwargs['_return_http_data_only'] = True
5841        if kwargs.get('callback'):
5842            return self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5843        else:
5844            (data) = self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5845            return data

Updates recipients in a template. Updates recipients in a template. You can edit the following properties: email, userName, routingOrder, faxNumber, deliveryMethod, accessCode, and requireIdLookup. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_recipients(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str resend_envelope:
  • TemplateRecipients template_recipients:
Returns

RecipientsUpdateSummary If the method is called asynchronously, returns the request thread.

def update_recipients_with_http_info(self, account_id, template_id, **kwargs)
5847    def update_recipients_with_http_info(self, account_id, template_id, **kwargs):
5848        """
5849        Updates recipients in a template.
5850        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5851        This method makes a synchronous HTTP request by default. To make an
5852        asynchronous HTTP request, please define a `callback` function
5853        to be invoked when receiving the response.
5854        >>> def callback_function(response):
5855        >>>     pprint(response)
5856        >>>
5857        >>> thread = api.update_recipients_with_http_info(account_id, template_id, callback=callback_function)
5858
5859        :param callback function: The callback function
5860            for asynchronous request. (optional)
5861        :param str account_id: The external account number (int) or account ID Guid. (required)
5862        :param str template_id: The ID of the template being accessed. (required)
5863        :param str resend_envelope:
5864        :param TemplateRecipients template_recipients:
5865        :return: RecipientsUpdateSummary
5866                 If the method is called asynchronously,
5867                 returns the request thread.
5868        """
5869
5870        all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients']
5871        all_params.append('callback')
5872        all_params.append('_return_http_data_only')
5873        all_params.append('_preload_content')
5874        all_params.append('_request_timeout')
5875
5876        params = locals()
5877        for key, val in iteritems(params['kwargs']):
5878            if key not in all_params:
5879                raise TypeError(
5880                    "Got an unexpected keyword argument '%s'"
5881                    " to method update_recipients" % key
5882                )
5883            params[key] = val
5884        del params['kwargs']
5885        # verify the required parameter 'account_id' is set
5886        if ('account_id' not in params) or (params['account_id'] is None):
5887            raise ValueError("Missing the required parameter `account_id` when calling `update_recipients`")
5888        # verify the required parameter 'template_id' is set
5889        if ('template_id' not in params) or (params['template_id'] is None):
5890            raise ValueError("Missing the required parameter `template_id` when calling `update_recipients`")
5891
5892
5893        collection_formats = {}
5894
5895        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
5896        path_params = {}
5897        if 'account_id' in params:
5898            path_params['accountId'] = params['account_id']
5899        if 'template_id' in params:
5900            path_params['templateId'] = params['template_id']
5901
5902        query_params = {}
5903        if 'resend_envelope' in params:
5904            query_params['resend_envelope'] = params['resend_envelope']
5905
5906        header_params = {}
5907
5908        form_params = []
5909        local_var_files = {}
5910
5911        body_params = None
5912        if 'template_recipients' in params:
5913            body_params = params['template_recipients']
5914        # HTTP header `Accept`
5915        header_params['Accept'] = self.api_client.\
5916            select_header_accept(['application/json'])
5917
5918        # Authentication setting
5919        auth_settings = []
5920
5921        return self.api_client.call_api(resource_path, 'PUT',
5922                                        path_params,
5923                                        query_params,
5924                                        header_params,
5925                                        body=body_params,
5926                                        post_params=form_params,
5927                                        files=local_var_files,
5928                                        response_type='RecipientsUpdateSummary',
5929                                        auth_settings=auth_settings,
5930                                        callback=params.get('callback'),
5931                                        _return_http_data_only=params.get('_return_http_data_only'),
5932                                        _preload_content=params.get('_preload_content', True),
5933                                        _request_timeout=params.get('_request_timeout'),
5934                                        collection_formats=collection_formats)

Updates recipients in a template. Updates recipients in a template. You can edit the following properties: email, userName, routingOrder, faxNumber, deliveryMethod, accessCode, and requireIdLookup. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_recipients_with_http_info(account_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str resend_envelope:
  • TemplateRecipients template_recipients:
Returns

RecipientsUpdateSummary If the method is called asynchronously, returns the request thread.

def update_tabs(self, account_id, recipient_id, template_id, **kwargs)
5936    def update_tabs(self, account_id, recipient_id, template_id, **kwargs):
5937        """
5938        Updates the tabs for a recipient.
5939        Updates one or more tabs for a recipient in a template.
5940        This method makes a synchronous HTTP request by default. To make an
5941        asynchronous HTTP request, please define a `callback` function
5942        to be invoked when receiving the response.
5943        >>> def callback_function(response):
5944        >>>     pprint(response)
5945        >>>
5946        >>> thread = api.update_tabs(account_id, recipient_id, template_id, callback=callback_function)
5947
5948        :param callback function: The callback function
5949            for asynchronous request. (optional)
5950        :param str account_id: The external account number (int) or account ID Guid. (required)
5951        :param str recipient_id: The ID of the recipient being accessed. (required)
5952        :param str template_id: The ID of the template being accessed. (required)
5953        :param TemplateTabs template_tabs:
5954        :return: Tabs
5955                 If the method is called asynchronously,
5956                 returns the request thread.
5957        """
5958        kwargs['_return_http_data_only'] = True
5959        if kwargs.get('callback'):
5960            return self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5961        else:
5962            (data) = self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5963            return data

Updates the tabs for a recipient. Updates one or more tabs for a recipient in a template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_tabs(account_id, recipient_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

Tabs If the method is called asynchronously, returns the request thread.

def update_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs)
5965    def update_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
5966        """
5967        Updates the tabs for a recipient.
5968        Updates one or more tabs for a recipient in a template.
5969        This method makes a synchronous HTTP request by default. To make an
5970        asynchronous HTTP request, please define a `callback` function
5971        to be invoked when receiving the response.
5972        >>> def callback_function(response):
5973        >>>     pprint(response)
5974        >>>
5975        >>> thread = api.update_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
5976
5977        :param callback function: The callback function
5978            for asynchronous request. (optional)
5979        :param str account_id: The external account number (int) or account ID Guid. (required)
5980        :param str recipient_id: The ID of the recipient being accessed. (required)
5981        :param str template_id: The ID of the template being accessed. (required)
5982        :param TemplateTabs template_tabs:
5983        :return: Tabs
5984                 If the method is called asynchronously,
5985                 returns the request thread.
5986        """
5987
5988        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
5989        all_params.append('callback')
5990        all_params.append('_return_http_data_only')
5991        all_params.append('_preload_content')
5992        all_params.append('_request_timeout')
5993
5994        params = locals()
5995        for key, val in iteritems(params['kwargs']):
5996            if key not in all_params:
5997                raise TypeError(
5998                    "Got an unexpected keyword argument '%s'"
5999                    " to method update_tabs" % key
6000                )
6001            params[key] = val
6002        del params['kwargs']
6003        # verify the required parameter 'account_id' is set
6004        if ('account_id' not in params) or (params['account_id'] is None):
6005            raise ValueError("Missing the required parameter `account_id` when calling `update_tabs`")
6006        # verify the required parameter 'recipient_id' is set
6007        if ('recipient_id' not in params) or (params['recipient_id'] is None):
6008            raise ValueError("Missing the required parameter `recipient_id` when calling `update_tabs`")
6009        # verify the required parameter 'template_id' is set
6010        if ('template_id' not in params) or (params['template_id'] is None):
6011            raise ValueError("Missing the required parameter `template_id` when calling `update_tabs`")
6012
6013
6014        collection_formats = {}
6015
6016        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
6017        path_params = {}
6018        if 'account_id' in params:
6019            path_params['accountId'] = params['account_id']
6020        if 'recipient_id' in params:
6021            path_params['recipientId'] = params['recipient_id']
6022        if 'template_id' in params:
6023            path_params['templateId'] = params['template_id']
6024
6025        query_params = {}
6026
6027        header_params = {}
6028
6029        form_params = []
6030        local_var_files = {}
6031
6032        body_params = None
6033        if 'template_tabs' in params:
6034            body_params = params['template_tabs']
6035        # HTTP header `Accept`
6036        header_params['Accept'] = self.api_client.\
6037            select_header_accept(['application/json'])
6038
6039        # Authentication setting
6040        auth_settings = []
6041
6042        return self.api_client.call_api(resource_path, 'PUT',
6043                                        path_params,
6044                                        query_params,
6045                                        header_params,
6046                                        body=body_params,
6047                                        post_params=form_params,
6048                                        files=local_var_files,
6049                                        response_type='Tabs',
6050                                        auth_settings=auth_settings,
6051                                        callback=params.get('callback'),
6052                                        _return_http_data_only=params.get('_return_http_data_only'),
6053                                        _preload_content=params.get('_preload_content', True),
6054                                        _request_timeout=params.get('_request_timeout'),
6055                                        collection_formats=collection_formats)

Updates the tabs for a recipient. Updates one or more tabs for a recipient in a template. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

Tabs If the method is called asynchronously, returns the request thread.

def update_template_document_tabs(self, account_id, document_id, template_id, **kwargs)
6057    def update_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
6058        """
6059        Updates the tabs for a template
6060        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
6061        This method makes a synchronous HTTP request by default. To make an
6062        asynchronous HTTP request, please define a `callback` function
6063        to be invoked when receiving the response.
6064        >>> def callback_function(response):
6065        >>>     pprint(response)
6066        >>>
6067        >>> thread = api.update_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
6068
6069        :param callback function: The callback function
6070            for asynchronous request. (optional)
6071        :param str account_id: The external account number (int) or account ID Guid. (required)
6072        :param str document_id: The ID of the document being accessed. (required)
6073        :param str template_id: The ID of the template being accessed. (required)
6074        :param TemplateTabs template_tabs:
6075        :return: Tabs
6076                 If the method is called asynchronously,
6077                 returns the request thread.
6078        """
6079        kwargs['_return_http_data_only'] = True
6080        if kwargs.get('callback'):
6081            return self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
6082        else:
6083            (data) = self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
6084            return data

Updates the tabs for a template Updates tabs in the document specified by documentId in the template specified by templateId. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

Tabs If the method is called asynchronously, returns the request thread.

def update_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs)
6086    def update_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
6087        """
6088        Updates the tabs for a template
6089        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
6090        This method makes a synchronous HTTP request by default. To make an
6091        asynchronous HTTP request, please define a `callback` function
6092        to be invoked when receiving the response.
6093        >>> def callback_function(response):
6094        >>>     pprint(response)
6095        >>>
6096        >>> thread = api.update_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
6097
6098        :param callback function: The callback function
6099            for asynchronous request. (optional)
6100        :param str account_id: The external account number (int) or account ID Guid. (required)
6101        :param str document_id: The ID of the document being accessed. (required)
6102        :param str template_id: The ID of the template being accessed. (required)
6103        :param TemplateTabs template_tabs:
6104        :return: Tabs
6105                 If the method is called asynchronously,
6106                 returns the request thread.
6107        """
6108
6109        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
6110        all_params.append('callback')
6111        all_params.append('_return_http_data_only')
6112        all_params.append('_preload_content')
6113        all_params.append('_request_timeout')
6114
6115        params = locals()
6116        for key, val in iteritems(params['kwargs']):
6117            if key not in all_params:
6118                raise TypeError(
6119                    "Got an unexpected keyword argument '%s'"
6120                    " to method update_template_document_tabs" % key
6121                )
6122            params[key] = val
6123        del params['kwargs']
6124        # verify the required parameter 'account_id' is set
6125        if ('account_id' not in params) or (params['account_id'] is None):
6126            raise ValueError("Missing the required parameter `account_id` when calling `update_template_document_tabs`")
6127        # verify the required parameter 'document_id' is set
6128        if ('document_id' not in params) or (params['document_id'] is None):
6129            raise ValueError("Missing the required parameter `document_id` when calling `update_template_document_tabs`")
6130        # verify the required parameter 'template_id' is set
6131        if ('template_id' not in params) or (params['template_id'] is None):
6132            raise ValueError("Missing the required parameter `template_id` when calling `update_template_document_tabs`")
6133
6134
6135        collection_formats = {}
6136
6137        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
6138        path_params = {}
6139        if 'account_id' in params:
6140            path_params['accountId'] = params['account_id']
6141        if 'document_id' in params:
6142            path_params['documentId'] = params['document_id']
6143        if 'template_id' in params:
6144            path_params['templateId'] = params['template_id']
6145
6146        query_params = {}
6147
6148        header_params = {}
6149
6150        form_params = []
6151        local_var_files = {}
6152
6153        body_params = None
6154        if 'template_tabs' in params:
6155            body_params = params['template_tabs']
6156        # HTTP header `Accept`
6157        header_params['Accept'] = self.api_client.\
6158            select_header_accept(['application/json'])
6159
6160        # Authentication setting
6161        auth_settings = []
6162
6163        return self.api_client.call_api(resource_path, 'PUT',
6164                                        path_params,
6165                                        query_params,
6166                                        header_params,
6167                                        body=body_params,
6168                                        post_params=form_params,
6169                                        files=local_var_files,
6170                                        response_type='Tabs',
6171                                        auth_settings=auth_settings,
6172                                        callback=params.get('callback'),
6173                                        _return_http_data_only=params.get('_return_http_data_only'),
6174                                        _preload_content=params.get('_preload_content', True),
6175                                        _request_timeout=params.get('_request_timeout'),
6176                                        collection_formats=collection_formats)

Updates the tabs for a template Updates tabs in the document specified by documentId in the template specified by templateId. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.update_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

Tabs If the method is called asynchronously, returns the request thread.